+1 ^^^
For the most part all automatic transmissions have integrated bell housings, this means the bell housing, the part with the holes that must align with engine block, can not be swapped easily.
The rear of the bell housing is the front casing of the main pump inside the transmission, so to swap bell housings you need a complete tear down and rebuild.
Manual transmissions had separate bell housings for the most part up to mid-1980's.
So you could swap bell housings if transmissions were compatible.
Ford started using the M5OD-R1 5-speed manual in Rangers in 1988, these turned out to be very reliable transmissions, and were used until end of production in 2012.
But they have an integrated bell housing, so no swapping just the bell housing.
These also came in 2WD or 4WD using different tail shafts and housing, best to get what you need vs trying to find parts to change it.
M5OD-R1 was used on 2.9l(2WD) and 4.0l(2WD or 4WD) engine which share the same block so share the same transmission bolt pattern.
4.0l SOHC isn't the same block but does use the same bolt pattern as 2.9l and 4.0l OHV.
2.3l/2.5l Lima has unique bolt pattern
3.0l Vulcan has unique bolt pattern
2.3l Duratec has unique bolt pattern
2.9l/4.0l have unique bolt pattern
So no interchange between these 4 patterns