You can't compare images data (well, you probably can extract them both to BASE64 string and compare strings, but this will be slow and really a huge overkill). So you need some sort of a database. I have already recommended a few options to you in another post:
Use CSV for storing these lists of numbers. Load CSV into array and pick random numbers from the array, making sure that 2 numbers are not the same.
Instead of many animations with many duplicating images, add all images as files to your project, create 2 blank sprites and load imaged into them using "Load Image from URL" action. This will also decrease app/download size and memory usage, especially if your images are big.