It could be something as inocuous as a loose heat shield; similarly, I experienced a rattling sound from the engine compartment that turned out to be some bracket, the connections for which had corroded, and the thing fell onto the exhaust pipes. I only discovered this when jacking up the car to do a coolant change myself. You'll have to get yours up on a lift and check all sorts of things, engine mounts, transmission mounts, exhaust brackets, etc., etc., etc.