It is possible to swap in a cobra engine in your 04 v6. You will need the engine, wiring, harness, ECU, cobra fuel pump, 6spd transmission of the engine doesn't have it for some reason...as well as a bunch of other things including suspension, brakes, and drivetrain...you could probably buy an 03/04 cobra after the costs for a swap, but that's my .02
There is a complete engine/transmission/wiring/ECU setup for sale at MPS Auto Salvage...for 10k it can be yours.
03 04 MUSTANG COBRA 4.6 V8 ENGINE TREMEC T56 CONVERSION
12 Black GT500 SVT PP l 2.6 Pulley/Idler l Airaid l o/r X l 305 NT555R's l Recaros l
04 Azure Blue Mach 1 / 03 Sonic Blue 3.8 / 14 Sterling Grey F150 FX4 402A 5.0 / 11 GT500 R.I.P.