For arabic we have some reference i.e quran but not much for farsi
the other problem that for almost all arabic word there is some other word in farsi , and urdu being the bridge uses and incorporate all those verity of words.
I am not certain about ghulam’s origin but closest i think is the word ‘Ghulman’ which is used for male servent in heaven