Collective in-plane magnetization in a two-dimensional XY macrospin system within the framework of generalized Ott–Antonsen theory