Lithography-based fabrication of nanopore arrays in freestanding SiN and graphene membranes