You didn't mentioned model year, mileage, trim level, market, etc. Given your screen name - not sure if that refers to this car or what you had before.
I agree with K_Watson - this sounds like it could be coming from the belt tensioner / idler pulley / accessory pulley area. Has that telltale "rattling/knocking" noise when you hit a certain RPM - but usually, it happens when you unload that area - ie, that small window when you let off the throttle, possible during light throttle application).
If you are holding the throttle steady and getting this noise at speed - could be related to the VVT-i system. If the OCV (oil control valve) is not working or the filter associated with the OCV is clogged, VVT-i operation will not be optimal - could see increased engine noise at partial throttle (engine knocking) and loss of power across the powerband. This is more likely the case when the engine is warmed up - if the noise is less noticeable or not there when the engine is cold.
Another possibility is a failing or dying upstream O2 sensor. This case, it is barely working, so as to not trip a DTC (diagnostic trouble code) - but not functional enough to ensure good driveability and operation. Usually a sudden drop in fuel economy is a sign of a dying O2 sensor - but not always the case. You didn't mention the miles on the car, but these are generally designed to last about 100K miles, anything past that is gravy.
The mechanic will have to do a pretty throughout diagnostic and not fall in that rut of swapping parts on your dime, to "figure out" what is wrong. Got to check the basics, try and isolate the noise source: Assuming they already checked the most obvious stuff, Fuel and Fire
- fuel: make sure fuel supply is good (good pressure to injector rail, injectors working, fuel pump keeping up with demand, etc.), also need to check on the induction system (air supply) - no cracks in the intake system, no vacuum leaks, MAF sensor working, IAT reading correctly, throttle body inspected, TPS sensor working, etc.
- fire: make sure that ignition system is producing a good spark, plugs are good, coil on plug igniters are good, system reading the crank position sensor correctly, etc.
If they didn't check that - go somewhere else. If you can't baseline the system, can't effectively diagnose the problem. The tech will also need access to a Toyota Techstream or similar test tool - this will allow them to command and interrogate sensors - see if they respond like they should (ie, the VVT-i system).