  Flatbands play an important role in correlated quantum matter and have novel
applications in photonic lattices. Synthetic magnetic fields and destructive
interference in lattices are traditionally used to obtain flatbands. However,
such methods can only obtain a few flatbands with most bands remaining
dispersive. Here we realize all-band-flat photonic lattices of an arbitrary
size by precisely controlling the coupling strengths between lattice sites to
mimic those in Fock-state lattices. This allows us to go beyond the
perturbative regime of strain engineering and group all eigenmodes in
flatbands, which simultaneously achieves high band flatness and large usable
bandwidth. We map out the distribution of each flatband in the lattices and
selectively excite the eigenmodes with different chiralities. Our method paves
a new way in controlling band structure and topology of photonic lattices.
