Patterned illumination through the phase modulation of light is increasingly recognized as a powerful tool to investigate biological tissues in combination with two-photon excitation and light-sensitive molecules. However, to date two-photon patterned illumination has only been coupled to traditional microscope objectives, thus limiting the applicability of these methods to superficial biological structures. Here, we show that phase modulation can be used to efficiently project complex two-photon light patterns, including arrays of points and large shapes, in the focal plane of graded index (GRIN) lenses. Moreover, using this approach in combination with the genetically encoded calcium indicator GCaMP6, we validate our system performing scanless functional imaging in rodent hippocampal networks in vivo ~1.2 mm below the brain surface. Our results open the way to the application of patterned illumination approaches to deep regions of highly scattering biological tissues, such as the mammalian brain.