Alloy multilayers and ternary nanostructures by direct-write approach