Did they provide the actual OBD-II codes by chance? Did they run a real-time out or capture any frame data when the car was running?
This car uses an air fuel ratio sensor instead of an O2 sensor - sort of like a high resolution/high performance O2 sensor. The MAF malfunction and faulty O2 sensor can cause much of the issues you are seeing, though for a 2009 model year, unless the engine was modded or otherwise played with or has an enormous amount of mileage on it - they should not have died this soon. Misfiring could be a symptom of the other two malfunctions. These also point to a possible ECM malfunction - though hard to say without some realtime data captured during operation or even a snapshot of an operational frame.
As for other possible culprits - there are number of them, from an ignition timing error, problem with the chassis grounds, faulty fuel delivery system or consistently bad tanks of gas, clogged or fouled injectors, etc.
ntermittent behavior like this is hard to diagnose, especially by a shop that doesn't have experience with this particular engine - Toyota dealers are usually your best shot, unless that particular shop is incompetent. If it was only the misfire, or MAF, or AFR sensor alone - that would make it easier to diagnose over the web - but all three makes it much more difficult, as they point to a number of possible culprits.
Definitely a time to take it to a competent shop. Car should still be under warranty - unless you ran over the 5yr/60K mile powertrain mileage portion. That case, it could be argued that the MAF and AFR sensor are essential for emissions requirements - as those are covered under the 8yr/80K mile warranty period. Definitely need to get this to a dealership to start a papertrail on it. I