  Single-atom imaging resolution of many-body quantum systems in optical
lattices is routinely achieved with quantum-gas microscopes. Key to their great
versatility as quantum simulators is the ability to use engineered light
potentials at the microscopic level. Here, we employ dynamically varying
microscopic light potentials in a quantum-gas microscope to study commensurate
and incommensurate 1D systems of interacting bosonic Rb atoms. Such
incommensurate systems are analogous to doped insulating states that exhibit
atom transport and compressibility. Initially, a commensurate system with unit
filling and fixed atom number is prepared between two potential barriers. We
deterministically create an incommensurate system by dynamically changing the
position of the barriers such that the number of available lattice sites is
reduced while retaining the atom number. Our systems are characterised by
measuring the distribution of particles and holes as a function of the lattice
filling, and interaction strength, and we probe the particle mobility by
applying a bias potential. Our work provides the foundation for preparation of
low-entropy states with controlled filling in optical-lattice experiments.
