When we say that the metals/ionic compounds are malleable, we are saying that the metals can bend. In other words, ionic compounds are flexible. Therefore they are also ductile which means that the metals can be transformed in to wires without losing its strength. Now the reasons why the metals are ductile and malleable, are accordingly because of their valence electrons. The mobility of them indeed tells us how they can be flexible and made into wires. The reason is because the outside shape may change yet the internal shape still remains the same.