Two ARRAY questions

Hey guys I have a random image generator and I would like to add more user interaction to it. The way it works is that every 10 seconds a new image is randomly selected and displayed.

Question #1
How do I make it so that every number that has been generated is appended to an Array?

Question #2
How do I check to make sure that the image being loaded is not already in that Array?

Thanks all!