As of November, 2013, Ford had built 400,000 F150s with the Ecoboost 3.5L engine. There are plenty of "totaled" 2011-2014 F150 Ecoboost trucks in wrecking yards.
You can buy a complete powertrain drop-out kit for about $5500, which includes the engine with all accessories & turbos, the transmission, the H-pipe with cats and UHEGOs, the PCM and all the wiring, the steering column with key, the BCM (Body Control Module, which is a smart fuse box), the vacuum pump, the fuel pump and sender with the FPDM (Fuel pump driver module)
To swap this powertrain into a Mustang or Ranger, you need some other parts like a custom air-to-air intercooler, an oil cooler, a larger radiator, modified drive shaft, etc. so I would plan about $8000 budget to be safe. Still a bargain for the performance that will result.