I've been reading a lot of articles on the history and population genetics of the South Asian caste system, and have bookmarked them, but it is taking time to get to the point where I feel that I have a firm enough command of the material to synthesize that information into a well referenced post here.
The story at the top of the caste pyramid is pretty well understood and is fairly familiar to me (although still more complex than conventional wisdom would suggest), as this is deeply interrelated to the relatively familiar topic of Indo-European and Dravidian linguistic origins.
In the middle, the main story seems to be one of regional variation and of the extent to which geography and caste are more relevant to a particular population's genetic makeup. This story is less familiar, but still seems amenable to an analysis not unlike that done at the top of the pyramid.
But, I'm particularly intrigued by and still coming to terms with understanding the distinction between middle to lower caste individuals and people who are beneath the main varna structure entirely, which consists of two distinct populations: "untouchables" a.k.a. Dalits a.k.a. Scheduled Castes, on one hand, and "tribal" populations, on the other.
Dipping my toe in so far, the population genetics of the Scheduled Castes seem to be dominated by distinctively South Asian features not found in any other population on earth and properly characterized as indigenous. This begs the question of how the "otherness" of these castes came to be, with a tentative hypothesis that the Scheduled Castes may have been mostly made up of the descendants of prisoners of war captured in wars between South Asian micro-states when the subcontinent had a balkanized political landscape who were held in a slave-like status at some point.
In contrast, so far, the population genetics of "tribal" populations in India appear to vary greatly from tribe to tribe, are sometimes not dominated by genetic features private to South Asia, and do not always have genetics that reflect their current language suggesting that there have been instances of language shift in tribal populations.
It tentatively appears that many of the tribal populations that have been foragers in historical time periods reverted to that status after having ancestors who were probably food producers who migrated to South Asia from outside the subcontinent at some point during the latter half of the Holocene era. This is contrary to the conventional wisdom that sees tribal populations as the indigenous hunter-gatherers of India, which is true if one looks only to the historic era, but may not be true when viewed from the sweeping perspective of the entire Holocene era.
As I note, these tentative conclusions are subject to change, undigested, unrefined, and not carefully sourced to the references that support them at this point, as I go through the process of assimilating and making sense of the rather large literature on the subject, not all of which is consistent. But, this post does provide some work in process update to what I've been looking at and thinking about on that score.
I'd welcome comments on these tentative ideas, pointers to different well supported hypotheses, and sources that address these questions from various disciplinary perspectives.