you want a 2000-2003 4.6l engine. Yours is a PI motor. the 1997-1999 where non PI. They will drop right in and work, but the non PI has les HP. Other than the difference in HP, the 4.6l engines are interchangeable.
Would any 00-03 pi engine work or does it have to be out of an f150
Yes they will work.
But some out of cars might have a different intake manifold with the throttle body sitting differently. (Like the Mustangs)
All you would need to do is swap the intake manifold.
Oh, and some may have a different setup for all the accessories.So the front timing cover might be different.