Rare earth alloy energy storage