The 4.10 gears are in general good with 31" tires. The 3.0 engine is not great on torque so it would probably benefit with lower gears. If you have 2WD there may be 4.33 gears available depending on which rear axle you have. If you have 4WD, 4.56 gears would be the next lower gear. The 3.0 pretty much like high revs, so you should be OK there. I have 4.56 gears on my 4.0 SOHC Ranger and run 31" tires on pavement. At first I didn't like the higher rpm at the highway speeds I normally run but got used to it and really like how well it accelerates.
I you are running shorter tires and switch to taller tires you will notice slower acceleration if you keep the same gears. Many people don't mind that but you may. The best approach to it is, if you want 31" tires, go ahead a put them on. If you don't like how it accelerates or climbs hills, you will then need to invest in lower gears.
I can assure you 4.10 gears will work with 31" tires. I drove an 89 STX with a 2.9L engine for many years with 4.10 gears and 31" tires. I was very happy with it. Before I switched to the 4.10 gears it had 3.73 gears. That was not a good ratio for 31" tires. I burned out the clutch in about 50K miles.