Frequency locking in Josephson arrays: Connection with the Kuramoto model