You're inventing your own terminology "document array" to explain your data model - it would make for better communication if your learnt the standard vocabulary. XML does not have arrays.
The code
<xsl:for-each select="EventMatters/EventMattersResult">
...
</xsl:for-each>
is equivalent to a nested loop:
<xsl:for-each select="EventMatters">
<xsl:for-each select="EventMattersResult">
The expression EventMatters/EventMattersResult returns a node-set (or in 2.0, a node sequence) containing all the EventMattersResult children of all the EventMatters children of the context node.
In the expression
<xsl:if test="EventMatters/EventMattersResult/Result = $VARIABLE">
once again EventMatters/EventMattersResult/Result selects a node-set. The semantics of "=" in XPath, when one of the operands is a node-set, are that the operator returns true if any item on the lhs is equal to any item on the rhs; so (assuming that $VARIABLE holds a string) you are testing whether any of the nodes in the node-set is equal to the variable.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference