Light can exert radiation pressure on any object it encounters, and the resulting optical force can be used to manipulate particles at the micro- or nanoscale. In this work, we present a detailed comparison through numerical simulations of the optical forces that can be exerted on polystyrene spheres of the same diameter. The spheres are placed within the confined fields of three optical resonances supported by all-dielectric nanostructure arrays, including toroidal dipole (TD), anapoles, and quasi-bound states in continuum (quasi-BIC) resonances. By elaborately designing the geometry of a slotted-disk array, three different resonances can be supported, which are verified by the multipole decomposition analysis of the scattering power spectrum. Our numerical results show that the quasi-BIC resonance can produce a larger optical gradient force, which is about three orders of magnitude higher than those generated from the other two resonances. The large contrast in the optical forces generated with these resonances is attributed to a higher electromagnetic field enhancement provided by the quasi-BIC. These results suggest that the quasi-BIC resonance is preferred when one employs all-dielectric nanostructure arrays for the trapping and manipulation of nanoparticles by optical forces. It is important to use low-power lasers to achieve efficient trapping and avoid any harmful heating effects.