Fabrication and morphology dependent magnetic properties of cobalt nanoarrays via template-assisted electrodeposition