Self-assembling of alloy nanostructures on van der Waals surfaces