I know it's ephemeral, but it's bothering me now someone said it was a shortening of "inmate", which I have doubts over.
When did "mate" become a thing, and how?
Mate is also commonly used in New Zealand, parts of England and to an extent south africa, so I think you'll need to go further back into the history of English to find an answer to that