Codah, thanks, but I already knew that was pretty much what I needed to do. I guess I should clarify I'm asking about the specifics of where in Construct do I find an array to put into an event sheet and then how exactly do I set up the for loop?
Yes specifics help. People asking the same question can mean very different things.
Right click on Object Types, choose Add new Object and choose "Array". You can add more than one. You can rename it. It will default to a 'list' length of 10 (i.e. Width of 10) if you look at its properties under Object Types Properties. Now read https://www.scirra.com/manual/108/array. Basically "Array:Set value VAL at POS" will set an item in the list.
Use Array:For each element to go through the array, comparing CurX with your value. Again, read the above section for details of using For Each. There's no need for me to retype the manual <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile"> After reading, ask if you have any problems.