Nanomagnetic arrays are widespread in data storage and processing. As current technologies approach fundamental limits on size and thermal stability, extracting additional functionality from arrays is crucial to advancing technological progress. One design exploiting the enhanced magnetic interactions in dense arrays is the geometrically-frustrated metamaterial 'artificial spin ice' (ASI). Frustrated systems offer vast untapped potential arising from their unique microstate landscapes, presenting intriguing opportunities from reconfigurable logic to magnonic devices or hardware neural networks. However, progress in such systems is impeded by the inability to access more than a fraction of the total microstate space. Here, we present a powerful surface-probe lithography technique, magnetic topological lithography, providing access to all possible microstates in ASI and related nanomagnetic arrays. We demonstrate the creation of two previously elusive states; the spin-crystal ground state of dipolar kagome ASI and high-energy, low-entropy 'monopole-chain' states exhibiting negative effective temperatures.