Application of stencil masks for ion beam lithographic patterning