Two-dimensional arrays of ballistic Josephson junctions are important as model systems for synthetic quantum materials. Here, we investigate arrays of multiterminal junctions which exhibit a phase difference 𝜑0 at zero current. When applying an in-plane magnetic field, we observe nonreciprocal vortex depinning currents. We explain this effect in terms of a ratchetlike pinning potential, which is induced by spontaneous supercurrent loops. Supercurrent loops arise in multiterminal 𝜑0 junction arrays as a consequence of next-nearest-neighbor Josephson coupling. Tuning the density of vortices to commensurate values of the frustration parameter results in an enhancement of the ratchet effect. In addition, we find a surprising sign reversal of the ratchet effect near frustration 1/3. Our work calls for the search for novel magnetic structures in artificial crystals in the absence of time-reversal symmetry.