Patterned nanostructured arrays for high-density magnetic recording