A man who punched random strangers in Manhattan has been convicted of several hate crimes.