Welcome to TRS
1984 Ranger 4x4 will have either a Toyo Kogyo 4-speed or 5-speed, TK4 or TK5
TK4 was only used in 1983/1984 on 4x4 Rangers
The TK5 was used from 1984 until 1987 on Ranger 4x4's, so there is a 1 year overlap for 4 or 5 speed, your year 1984
Yes, you could use 1983 to 1987 TK5 from Ranger 4x4
Not sure on the lengths of the 4-speed and 5-speed, if transmission length changes the front and rear drive lines need to be changed
1988 to 1992 Rangers used Mitsubishi FM145 or 146(4x4) or FM132(2WD), 5-speeds
The ones from 2.9l will with bolt to 2.8l engine but I think you would have to change drives shafts, clutch and flywheel
In 1990 Ford switched to the M5OD-R1(M5R1) 5-speed, it has integrated bell housing(doesn't come off), an M5R1 from a 4.0l 4x4 Ranger of any year would fit the 1984 2.8l engine and transfer case
Ford used the M5R1 from 1990 to 2012 on the 4.0l engine, OHV and SOHC had same bolt pattern as 2.8l
You would have to change drive shafts and clutch/flywheel
Replacing a Manual Transmission with a different Manual Transmission:
All 2.8, 2.9, 4.0 V-6's and transmissions are the same. keep flywheel, bellhousing, pilot bearing, throughout bearing, clutch release mechanism(s), flexplate, torque converter with the transmission.
The only modification that will need to be done is to the floor plate. You can either cut it to fit the new shifter or you can remove the front seats and pull the carpet back to get to the (4) 8mm bolts that hold it on and swap in the one from your donor. All that may be left is to trim the carpet. If you take your time, the piece that you trim out can be used to replaced the gap it will leave behind the shifter.