Tuning the frequency of a resonant element is of vital importance in both the macroscopic world, such as when tuning a musical instrument, as well as at the nanoscale. In particular, precisely controlling the resonance frequency of isolated nanoelectromechanical resonators (NEMS) has enabled innovations such as tunable mechanical filtering and mixing 1 as well as commercial technologies such as robust timing oscillators 2 . Much like their electronic device counterparts, the potential of NEMS grows when they are built up into large-scale arrays. Such arrays have enabled neutral-particle mass spectroscopy 3 and have been proposed for ultralowpower alternatives to traditional analog electronics 4 as well as nanomechanical information technologies like memory 5,6 , logic 7 , and computing [8][9][10][11] . A fundamental challenge to these applications is to precisely tune the vibrational frequency and coupling of all resonators in the array, since traditional tuning methods, like patterned electrostatic gating 12,13 or dielectric tuning 14 , become intractable when devices are densely packed. Here, we demonstrate a persistent, rewritable, scalable, and high-speed frequency tuning method for graphene-based NEMS [15][16][17][18] . Our method uses a focused laser and two shared electrical contacts to photodope [19][20][21][22] individual resonators by simultaneously applying optical and electrostatic fields. After the