Thanks for the replies everyone, those are good, maybe I didn't express what I'm looking for that well, but I remember there was also a thing like a nut end, threaded inside, that you screw the M3 bolt into.
Something like this, although I think they had a wider head?
I was originally thinking about using a threaded hex spacer, but I would only be able to fit a 5mm spacer in there, so I'd need something like a 7mm M3 for the top and a 3mm for the bottom to go into it. I couldn't find any M3 bolts as short as 3mm.
What do you guys use to screw together a layered case?