Inhomogeneous degradation in metal halide perovskites