Kinetic self-organization of trenched templates for the fabrication of versatile ferromagnetic nanowires