In general, magnetic screw mats really help with keeping screws organized.
If you're looking for an iPhone-specific solution, you might like the magnetic screw mats that iFixit sells for the CDMA (Verizon/Sprint) iPhone 4, the GSM (ATT) iPhone 4, the iPhone 3G/3GS, and the iPhone 4S.
For a more general solution, there's this magnetic organizer mat. It even has little trays for non-magnetic parts :)
Edit: I've used magnetic mats in my repairs, and have never had a problem with them. To be on the safe side, just keep the LCD and battery off of the mats, and you should be fine. The magnetic field from these type of mats isn't strong enough to damage things from a distance. :)