If I had a lot of silica or alumina, like on the moon, would I be able to split the silica or alumina into aluminium and oxygen/ silicon and oxygen? It doesn't matter how unpractical it is. If there is a way, how can it be done?
If you don't care too much about practicality, ionic compounds (i.e. salts) (which most minerals are) can be separated by melting them and then electrolysing. The only problem is that most salts have very high melting points. The needed temperature can be lowered by dissolving the salt in another lower melting point liquid, as happens in the Hall-Heroult process for aluminium production, but that only works if the dissolving liquid is more resistant to electrolysis than the stuff you're trying to electrolyse.
An even more general method of separating basically any compound is by heating it into a hot enough plasma to atomise it. The atoms can be separated using a calutron (which works similarly to a mass spectrometer). In reality such separation is only used with very small amounts of materials for analysis and historically for uranium enrichment, but there is no reason in principle why this could not be scaled up to an industrial scale.