okay here we go
You can convert the 4.0 pushrod or overhead cam engines to run a 5 speed yes, the parts will bolt up. The M50d manual trans is available in the ranger and will bolt up. There are 5 speed explorers out there also, but they are more rare. the 98-2011 Ranger uses similar engine (4.0) and 5 speed transmission. So the clutch pedal parts, hydraulics, etc are all avail to you to make this bolt in. However your engines computer also controls your automatic transmission. So when you remove your auto trans you will end up with a pissed off engine computer. This requires changes, you can complete your conversion and swap over to the manual trucks computer and do some wiring to match. Then you have a OEM style 5 speed swap, it can be done and it can and has been done a thousand times, you can make it look and act 100% factory, if you know what you are doing!
The 5.0L V8 trucks never came with a 5 speed, so it gets a bit more tricky. Because it is a 302 of course there are 5 speeds from the factory that bolt up, our favorite one to use is the M5OD-R2, the mazda 5 speed found behind the 302 and 4.2V6 in F150 and Broncos. So now using the pedals and hydraulics from a Ranger or V6 5 speed explorer you can mate up a 5 speed clutch, hydraulics, and trans behind your beloved 302 engine. However now you have a computer (PCM) that is really not happy because it is expecting inputs from the now missing 4r70w auto transmission. So you will have to TUNE THE PCM to forget about the old automatic, or your 302 will not run very well. These days the computer tuning is more common and parts to do so are more readily available,. So yes you can put a 5 speed behind the 302 in a Explorer/Ranger just know what you are getting into
It has been done, is being done and will be done again.
With a Ranger based vehicle (RBV) All of these combos are possible and you had better believe somebody out there has tried it and figured out how to make it work.
Many of us consider 5 speed swaps a simple conversion, I mean the parts bolt in for the most part, but it is still a conversion and there are obstacles to overcome...you better know your RBV pretty well if you go down these paths
I have saved many a RBV from the crusher by converting them to a 5 speed manual transmission, most of them the old pushrod V6 engines, but the SOHC and V8 can be done too