In my view hydrocarbons come towards the surface from depths between 150 and 300 km. They therefore leach through a very large amount of rock as they are driven up by buoyancy forces. By comparison surface waters running through some crustal rocks have an incomparably smaller driving force. The leaching has to be due to fluids that originate at depth, because only those have the pressure differentials that are required for effective leaching. At high pressures and temperatures many metals will form organometallics, that means molecules that combine metal atoms with such elements as carbon and hydrogen, possibly with some nitrogen and oxygen also.
Most organometallic compounds are soluble in hydrocarbon oils.
Such oils, being forced through the rocks, will have a chance to combine with metals in the rocks to make organometallic compounds. In turn those that are soluble in the oils can then be transported by that same flow. This will be so also for many metals that have very low solubilities in aqueous liquids. Among those molecules may be a class that is particularly favourable for forming a particular organometallic compound with one metal, another class with another. The great diversity of hydrocarbon molecules is thus the reason for the selectivity in the metal deposits.