What material can be used to create a mold for pouring any molten metal without problems?
For use with the widest range of metals, a properly prepared ceramic mold is your best bet. It can tolerate high temperatures and capture fine details well. However, these are commonly single-use molds that are broken to remove the cast object.

Rather than trying to find a "silver bullet," you're better off targeting your specific needs for each case. If you're casting a single sculpture in bronze or aluminum from a wax base ("lost wax" casting), use the ceramic mold. If you're doing a styrofoam master sculpt to cast ("lost foam" casting), use sand. For precious metals, use kiln-dried plaster. For low-temperature metals in one-off casts, plaster works well; for multiple casts, a heat-resistant rubber or some metals will work better.