Simple question regarding Array use

Hello all,
I have an array which consists of 50 objects. All of them located at x = 500, y = 500.
I would like to move one of them to another locaiton. However, I would like to move myArray[1] if possible, if it is not located at 500,500; I would like to move myArray[2]. How can I make a quick check for all of the objects and get the one with lowest number which is on 500,500?