Your main question is,
The thing I'm confused about, is how people usually associate many images with a single model.
So I'll focus on that:
In practice, Rails devs do this by using one of the gems for uploading and attaching images. E.g., Paperclip is maintained by Thoughtbot, is very well tested and supports S3.
AndBut if you're more interested, though, in experimenting and writing your own, you should take a look at Paperclip's source code to see what the current state-of-the-art is.