You use a for loop for this.
Look here at loops: https://www.scirra.com/manual/124/system-conditions
In the for loop you access your Array at x, which you iterate and y1 (fixed).
Yes, I have tried this, though I don't know how to keep y1 fixed.
I tried the following, and don't know how to only check values on y1.
[attachment=0:28uiug9c][/attachment:28uiug9c]