What are the conditions for liquid metal to be corrosive to another, different solid metal? I've had already been aware of the fact that metallic aluminum can be degraded by coming in contact with mercury, but also came across another question more recently here explains a similar reaction with liquid gallium.

So my question is more general regarding corrosive action of any liquid metal on other metals.

What are the more general conditions for a liquid metal to be corrosive to another, different solid metal?

Perhaps the word corrosive is not the most suitable choice. Corrosion refers to a chemical reaction. If I understand it right what's happening, at least in the case of $\ce{Ga}$ and $\ce{Hg}$ on $\ce{Al}$, is a weakening of the grain boundaries by displacement and amalgamation.

Another interesting thought occurred to me. Liquid sodium is often used as a coolant in nuclear power plants. It's pumped through metal pipe (material unknown). So here is a good example of a combination that doesn't lead to corrosion. Are there examples other than I've mentioned that lead to corrosion? So what makes the difference?
There are no general conditions- indeed there no general conditions for the any of the forms of corrosion. Solubility is a factor and many other factors but it just comes down the actual interactions between a given liquid metal and another metal and the service conditions such as temperature, velocity, impurities. 

Liquid-metal attack has the following categories:


simple solution,
alloying between liquid metal and solid metal,
intergranular penetration,
impurity reactions, 
temperature-gradient mass transfer,
concentration-gradient mass transfer, or dissimilar-metal
mass transfer. 


With that many means- determining what liquid metal damages what solid metal  is very difficult.

http://web.ornl.gov/info/reports/1956/3445603500959.pdf