Show random images only once in block sequence
So I'm creating an experiment with two parts on a tablet.
Part 1 and 2: Four images of children are shown on screen four times and the participant rank the pictures 1-4 every screen, there are 16 pictures in total.
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
These images are drawn from a randomised factorial design with 3000+ rows as the images have conditions to them, for example only show two girls and two boys, don't show the same picture in the same sequence etc. I'm calling the pictures at random to location A, B, C and D.
My issue is that I want each picture to only be shown once in each part but preferably at a random location. I.e. if a picture has been used in one four-picture sequence do not use it again in that part as I want my participants to see every picture just once in each part (so twice in total). How would I go about this?
Any help would be much appreciated!