You don't need to go through all values in the array. Say, if there are 100 objects and 5 lines, "For each XY" will process all 500 cells, you don't need that.
You loop through records of objects, which are on X axis. And for each object you can grab values form the corresponding cells on Y axis.
For example, if you need to get a value from the second line (Y=1):
Array.At(loopindex, 1)
or if you are using "For Each X":
Array.At(Array.CurX, 1)