If your dash rattles on your 04-05 Corolla or Matrix then I can tell you what I did to fix the problem.
First thing to do is remove the A-pillar trim. Then at the point where the A-pillar meets the dash you need to foam that area up. on both the dash and a-pillar. If you look at the a-pillar trim you should be able to see where the dash was rubbing up against it. You will have a hard time putting the trim back in without messing up the foam but when you do get it back in it will work wonders.
Second thing is if your rattle is coming from the inside the dash area than please use your warranty and have the dealer foam it up with as much foam as they can put in it. I did it myself and it worked great.
Third is something that I am still waiting for. Toyota has stepped up and said that they are redoing the rear motor mount. The noise/rattle you hear when you accelerate is from the rear motor mount. It is not avail. yet but Toyota is going to release it via a Technical Service Bulletin. Please keep in contact with your local Toyota dealer.
After you do this yourself, mainly because dealers dont like to mess with rattles because they dont make money on rattles, you will be extremely happy with no rattles from your dash. Check back later to find out about rear area rattles when seats are down.