Patterning using a multi-mask exposure