3M VHB tape. It's what the manufacturers use to initially install trim parts at the factories. You can buy it in different widths, depending on the application/part.
Click here -
Fishing twine or dental floss to cut the foam to remove the parts. Goo Gone or similar to remove any residue off the part. For painted body panels, in all honesty, your fingers are your best tool. Just slowly roll the adhesive off by pressing with your fingers and rolling it off. Yes, there's an eraser "wheel" you can buy for your cordless drill, but it's real easy to overheat and damage the paint. It's tedious with your fingers, but it's the best way.
Clean/prime the surfaces with rubbing alcohol before applying the tape. When you're ready to apply the tape, peel the backer and press the tape on for 30 seconds to let it wet onto the surface.