Could be in your VCT solenoids. They are known for causing idle issues when coming to a stop, going into reverse, etc. When the solenoid sticks, it can cause your camshaft to stay advanced when coming to a stop, causing a misfire or rough idle. There is one solenoid on each engine bank and they are about $50-55 per. It's not a guaranteed fix, but it's common, none-the-less.
Part # 8L3Z-6M280-B
2007 Ford F-150 Lariat SuperCab 2wd 5.4L 3V