As an example, you can start with a Glock 23 (40 S&W) and pick up a .357 Sig barrel for it and use the same 40 magazines as come with it. You can also pick up a 9mm conversion barrel and 9mm mags to shoot 9 mm in it. Same thing can be done with different models across the same rounds.

With a G20 (10mm) you can pick up a .40 S&W barrel and use the 10mm mags with 40's....some folks shoot 40's out of the 10mm barrel but if you're going to do much of it pick up a conversion barrel.