Guided assembly of nanostructures via elastic interactions