Self-ordered nanostructures on patterned substrates