We show that the effect of measurement backaction results in the generation of multiple many-body spatial modes of ultracold atoms trapped in an optical lattice, when scattered light is detected. The multipartite mode entanglement properties and their nontrivial spatial overlap can be varied by tuning the optical geometry in a single setup. This can be used to engineer quantum states and dynamics of matter fields. We provide examples of multimode generalizations of parametric down-conversion, Dicke, and other states; investigate the entanglement properties of such states; and show how they can be transformed into a class of generalized squeezed states. Furthermore, we propose how these modes can be used to detect and measure entanglement in quantum gases.