The are way more than four "gens" when it comes to Glock mags. They started with the Non Full Metal Lined (non drop free), and then went to the Full Metal Lined, and there have been several revisions. They will all fit in all the Glock models they were designed for, ie, all the Glock 17 mags will fit in all "gens" (although Glock never officially referred to 'gens' until the Gen4 came along).
They will all work in your gun. The only difference with the latest version designed for the Gen4, is that you can reverse the mag catch on the Gen4 guns (as well as a couple of "Gen3s", but they have a different system).
Regards.
Mark