I have noticed that some owners of cars with Valvematic or Vmatic for short, have queried the tapping or ticking noise coming from the engine during idle. The reason is because of the way the engine has been designed, the throttle is always open so there is very little vacuum produce in the inlet. So a vacuum pump is used to create the vacuum for the brake servo, just like a diesel engine. This vacuum pump will sound louder in a petrol engine, as it is masked by the clatter of a diesel engine.
Any other non-Valvematic engine petrol, say VVTi which has top end rattle, will have a problem! Anyway Valvematic engines have covers with that name (Valvematic) on it and the sound comes from the Vacuum pump at end of the cams, on the transmission side. When looking to buy a Toyota with a Valvematic engine, you will probably see a few and then be more familiar with the distinctive sound.
I have heard a rattly VVTi engine that was starved of oil, and that was totally different. Another thin