Ford 1999 zx2. Rough idle. Sputtering over 2k rpms. Check engine light. 25 mph limit and better with disconnected air intake

Originally it would give me all these problems, but it would also stall under 2k rpms. While trying to diagnose I noticed that removing the air intake connection at throttle body got rid of the stalling. But all the other problems persisted. Had to keep it at slightly above 2k rpms just to drive it around the block. Had to keep it steady. So i've basically ruled out fuel problems because gum out plus new fuel filter did absolutely nothing. I'm thinking maybe a sensor? Tried unplugging the MAF. No difference. Maybe the IAC? An added notable fact is that before this all happened I had a SLIGHT rough idle once and awhile and slight hesitation at random speeds but i replaced the spark wires and it ran great for two weeks. And then all of this happened

Hi so what you expect from a old 18 years old car has a lot to do with this. Removal of it's air intake will also mess up it's correct fuel ratio. So it would be running lean so it would splutter and die. So put it back on. Then we come to engine wear yes after all these years it must be very worn.

Having diagnostic checks run is always best way. Garage can do this through experience or if vehicle has diagnosis socket then using that. We may have a combination of faults but don't rule out fuel issues.
unplugging a Map or MAF will if its faulty have no improvement and may even have it non starting. The fact it has a check engine light and is essentially running in 'limp home mode' ( no revving above 2000) says its a fairly major problem and very likely an sensor issues. Altering air flow in shows we have a massive air fuel ration issue. Continued running is or may be ruining out cat too as unburnt fuel 'kills' a cat quickly.
yes IAC can have a large effect but ought not to stop revving above the 2000 mark. That is a safety limit set at factory on main computer to 'save' engine. Ergo garage visit as soon as possible. Not a coil or the 2000 limit would be exceeded even with rough running .poor power and bad idle or stalling.

Have you tried cleaning the throttle body yet for the idle problem?
You need to test the fuel pressure. Your problem is you don't have the tools needed to diagnose the problem and you're just hoping to guess and get lucky. I'd recommend a mechanic before you start throwing parts at it and waste your money! I'll bet You haven't even done a compression test yet!