Ion beam assisted formation of nanolayers