They stem, mainly, from Abraham and Keturah. Keturah was a Canaanite woman, as the Book of Jasher states. Canaan was a son of Ham, but a brother of Mitsraim/Egypt. The Mitsraim branch ended up with the really isolated genes for the kinky black hair -as some tribes of Japheth ended up with the genes for really kinky red hair, but the Canaanites intermarried with the Shemites all along. The sons of Jacob took many Canaanite wives, as the book of Jasher notes, and in Egypt, they took Egyptian wives, also, as well as intermarrying when the numbers increased form the original 70 that went into Egypt. Joseph took an Egyptian wife.
Only after the division at Bab-El did the tribes begin to separate and genetic information got more isolated. It was not like that before the Tower affair.
Abraham sent his six sons by Keturah "to the east", and remember, in the Book of Jasher, the Tower of Babel happened when Abraham was 49 years old, and so the tribes began to scatter by tongue, at that time, and also the earth began to be divided -continents from continent- at that time; as Jasher also states in that the sons of Eber, Peleg and Yoktan made note of those facts by their names, and genetic information was more and more isolated, as they divided and scattered...
Anyway, since you mentioned Jasher, thought I'd throw in what it says about Keturah, and the settling of the sons of Abraham "to the east" with them being the ancestors of the Dravidians, and intermixed, there, and then later separating more from the Shemites who were intermarried with the Medes, descended form Japheth, and who came to be called the "Aryans"...they were all related.
But the Tower affair was not so long after the flood, and the scattering of the tribes began after the Tower, and what is now India was not so populated in the time of Abraham's sending his sons "to the east".
Also, sons of Canaan were ancestors of the Sinites/ Chinese, and also intermarried with the other tribes until they were more and more isolated genetically.
Also, FYI, Keturah was Abraham's third wife. The Hebrew is "Ishyah" and Sarah, Hagar, and Keturah were all "ishyahs/wives" to Abraham. I do not know why the translators do not translate that word properly, probably biased. Anyway, Abraham divorced Hagar.
And in the Book of Jasher, Hagar was daughter of Pharaoh, who gave her to Sarah and told her Abraham was a great prophet, and she would have a good life with them. -That is also in Jasher.