If I understood correctly, something like this will do (probably there's a simpler way)
+ Button: On clicked
| Local boolean emptyFound = false
| Local number targetColumn = 2
----+ Array: For each XY element
----+ Array: Current value = ""
----+ System: Array.CurX = targetColumn
--------+ System: [X] Is emptyFound
---------> Functions: Call DoSomething (xIndex: Array.CurX , yIndex: Array.CurY)
---------> System: Set emptyFound to True
* On function 'DoSomething'
* Parameter 'xIndex' (Number)
* Parameter 'yIndex' (Number)
-> Text: Set text to xIndex & "," & yIndex