Complexing molecules? E.g. EDTA, crown ethers, paracyclophanes or cyclodextrins (they are available in different sizes for different metals) If you search for the key words you find tons of refs.
the most used precipitating agent for metals in aqueous environments, is TMT15, and industrial product widely available, it is trimercapto S triazine, and forms polymeric complexes that are iinsoluble with most metals!