Arsenal have confirmed the permanent sale of Fabio Vieira to Hamburg, ending the midfielder's three-year spell in north London.