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 VMP TVS l JLT123 l O/R X l 28x11.50Rx15 M/T Street R's l BMR Suspension l Recaros
03 Sonic Blue 3.8 / 17 Magnetic Fusion Sport 2.7 EB