I'm not familiar with repeating fields, but a script using the GetRepetition function might do the trick.
OTOH, rather than using a repeating field, it might be better to set up a related table for your images and put a portal to that table on your products layout. It would be dead easy then to turn your portal thumbnails into buttons that would take you to the related record in the image table layout.
I suggest you not use a repeating field for this. Storing the images in a table of related records with one container field per related record is much more flexible and you can still display your images in a horizontal row using a series of one row portals.
Thanks guys. Decided not to go with the repeating fields. Using a series of horizontally laid out single row portals from a related table did the trick. Did not realize you could target a row to get a particular record. Thanks a lot.