Patterning techniques for mesostructured films