How to store random coordinates?

Alternatively you can use an int i and say i++; in the for loop