Structured crystallization for efficient all-inorganic perovskite solar cells with high phase stability