Exploiting two-dimensional hybrid perovskites incorporating secondary amines for high-performance array photodetection