Creating better superconductors by periodic nanopatterning