Spanish midfielder Mikel Arteta, whose contract with Arsenal is due to expire, has announced his intention to retire from playing and move into coaching.