We have studied the transition between two different magnetization reversal mechanisms for thin Co/Pd multilayers with perpendicular magnetic anisotropy, appearing in magnetic dot and antidot arrays, which were prepared by nanosphere lithography. Various ordered arrays of nanostuctures, both magnetic dots and antidots, were created by varying size and distance between the nanospheres employing RF-plasma etching. We have shown that the coercivity values reach a maximum for the array of antidots with a separation length close to the domain wall width. In this case, each area between three adjacent holes corresponds to a single domain configuration, which can be switched individually. On the contrary, small hole sizes and large volume of material between them results in domain wall propagation throughout the system accompanied by strong domain wall pinning at the holes. We have also shown the impact of edge effects on the magnetic anisotropy energy.