I am a little scared that a lot of 10mm and .40 guns started out from 9mm...
As Nanuk says, while the .40 was specifically made to fit into 9mm sized guns, the 10mm is something else entirely.
The cartridge is much longer than 9mm, so a simple conversion from 9mm to 10mm isn't at all likely unless the 9mm pistol is much larger than it needs to be.
As far as the Glocks go, the model numbers tell you the order that they were designed.
The Glock 20 (the first 10mm Glock) was in design before the Glock 21 (the first .45ACP Glock). So it would actually be more accurate to say that the Glock 21 slide is the same dimensions as the Glock 20, not the other way around.
The first .40S&W Glock was the Glock 22. It hit the market before the 20, but the 20 design was started before the 22 design. In fact, the Glock 20 design process likely started before the .40S&W cartridge even existed. At any rate, worries that the 10mm Glocks are based on .40S&W designs, or on pistols of similar scale to 9mm, are unfounded.
The Glock 20 is much larger and heavier than any of the 9mm Glocks and is known for being very durable. In fact, it was the Glock 20's reputation for durability and my desire to get a 10mm pistol that drove me to buy my first Glock. I didn't care for the feel or look of the gun, but I did like the idea of something that could stand up to a lot of shooting with hot 10mm ammo, and at the time that meant buying a Glock 20.