Modelling hysteresis of interacting nanowires arrays