"M4" is the military's designation for the current issue assault rifle. Any semi-auto equivalent is an ar15. Sometimes guys will call their 16" barreled collapsible stock rifles an M4 to distinguish it as set up like an M4 but this is technically incorrect.
The flat top uppers are sometimes referred to as "A3" as in M16a3 because the A3's were the generations were the first to use the flat top. An A2 would be a fixed carry handle with the updated sights of the M16a2 and basically be configured just like an M16a2. Same goes for an A1.
More often than not "milspec" is just thrown around as a buzzword to sell product, not always but usually. Most AR15 stripped lowers are as good as the next and to be a true AR15 receiver it would have to be to the same dimensions as any other receiver. And any AR15 upper should mate to any lower.
I don't collect guns, I accumulate them.