Ferroelectric hybrid organic–inorganic perovskites and their structural and functional diversity