Perovskite batteries and sodium batteries