Superconductivity provides a canonical example of a quantum phase of matter. When superconducting islands are connected by Josephson junctions in a lattice, the low temperature state of the system can map to the celebrated XY model and its associated universality classes. This has been used to experimentally implement realizations of Mott insulator and Berezinskii--Kosterlitz--Thouless (BKT) transitions to vortex dynamics analogous to those in type-II superconductors. When an external magnetic field is added, the effective spins of the XY model become frustrated, leading to the formation of topological defects (vortices). Here we observe the many-body dynamics of such an array, including frustration, via its coupling to a superconducting microwave cavity. We take the design of the transmon qubit, but replace the single junction between two antenna pads with the complete array. This allows us to probe the system at 10 mK with minimal self-heating by using weak coherent states at the single (microwave) photon level to probe the resonance frequency of the cavity. We observe signatures of ordered vortex lattice at rational flux fillings of the array.