Ion beam irradiation of nanostructures: sputtering, dopant incorporation, and dynamic annealing