The 4.6 and 5.4 share bore size and cylinder spacing. Only the stroke and deck height differ. The 4.6 has a 3.543" stroke while the 5.4 has a 4.165" stroke. Both share the 3.552" bore.
I think the biggest you can go on a mod is a 3.7" bore if you use sleeves.
The 5.4 is a taller, wider engine than the 4.6 and isn't a drop in into the engine bay of a Mustang; it'll fit but it'll take some work to sort out. The intake ports are a bit further apart so you'd need a 5.4-specific intake manifold. The heads will fit but the headers will start a bit higher up and will thus end up a bit higher up (that is, nearer the floor)... There may be clearance issues at the sides because of the extra width and height.