I used to strap a bag with a strip of plastic and a rubber wedge under my old car. Came in handy a few times when I locked myself out. My new car has a sensor inside the key that doesn't allow it to lock if the key is inside the car.
On my previous van, my dad got a plastic box with magnets fastened to the back. He had an extra key made, put it in the box, and then attached it underneath the van up almost behind the right front tire. Good thing he did, because I had to use it once or twice.