Time-resolved investigation of magnetization dynamics of arrays of nonellipsoidal nanomagnets with nonuniform ground states