Toyota Rav 4 Rattle

One of the first things that I thought of when reading this was…pinging or spark knock.
Most people would describe this as sounding like pebbles rattling around in a tin can.
Does it sound like that?

Admittedly, this condition is much less common than it was years ago, due to electronic engine controls, but it is not unheard of.

If the noise is as I described above, have your mechanic check the operation of the knock sensor and the exhaust gas recirculation valve (EGR), as problems with these items can induce pinging. Also, have him verify that the engine is running at normal operating temperature, because if the engine is running hotter than it should, this can also induce pinging when the engine is under load–as when accelerating or when climbing hills.

Since your spark plugs are due for replacement right about now, I assume that your mechanic has ruled out the spark plugs as the source of the problem, but this is also something to consider.