In that cases except Adivasis ,all others have foreign blood in them.Dude ,Still you dont get it.Caste system was prevailed in India thousands of years ago before the foreign invasion.But at that time caste system was based on one's genuine behaviour.Brahmin means noble behaviour prevailed in one's blood.That wasnt based on their race or colour .Chanakya was a Brahmin but he had a black colour that kings couldnt even understand whether he was a Brahmin or not.
Kshatriya could be any one atthat time.But he should has a courage for protecting their land.
People having non ethical behaviour would be Shudra irrespective of their race or colour.
But some stupid people began to mention that it was based on heridatary while it was not.
During foreign invasion period evils in our society already firmed that believes and grabbed authority of land and wealth.So it was them who encountered against foreigners because they want to protect their status.Such invasion cause the presence of foreign blood Indians.But these caste system was based thousands years practice.