The US M5 3" gun was similar in size and weight to the US 90mm or British 17 Pounder. the 76mm M1 was made to duplicate the 3" performance in a lighter weapon. The US trialed the 76mm in the original M4 turret, and found it too cramped.Yes - the T23 turret was basically a drop-in replacement for the original Sherman turret. It must be noted that even before the original Shermans were deployed to North Africa, fitting the 3" High Velocity Gun (The same as the M10 Tank destroyer) was already well under way. The problem was, that while they could wedge it in, Armored Force concluded that, while teh gun performance was fine, there was no way to effectively us it in that turret.
But there was a way. Israel picked up Shermans after 1948 from a vareity of sources, and began upgrade programs, that was easy, given the modular construction.
leftover from the 1973 war, the M50. Note original image has been flipped, here is proper orientation
This was an early M4 direct vision hull, upgraded with the E8 suspension and Wright Radial replaced with a Cummins Diesel
The turret was an original 'low bustle' but had a loader hatch added, a counterweight welded to the backside to balance the new heavier main gun, the French GIAT CN-50 L/61 75mm, a gun built to match the German KwK42 in performance.
Much more powerful than the original M3 75mm gun, a box was welded to the original mount opening, allowing the gun to be moved forward outside of the turret ring, a heresy that the US Armored Force abhorred from the balancing issues it caused
This was an improvement on what the British had done for similar reasons with the Firefly's 17 Pounder
by welding a box at the rear for recoil travel and retaining the Radio Gear in the Turret, per British practice