The border between India-Pakistan and India-East Pakistan(or Bangladesh) was drawn not by a Rajah but by the British... a guy called Radcliffe. He never ever visited the places over which he drew the border. He was just given a pen, a stack of maps and a few days time. He ended up drawing a line that left large pockets of Muslim enclaves inside India and large pockets of Hindu-Sikh enclaves in Pakistan.....which quickly became the basis for genocide and mass exodus.
You should at least recognize that poor Mr. Radcliffe was given an impossible task. There was no possible line that would not have “left large pockets of Muslim enclaves inside India and large pockets of Hindu-Sikh enclaves in Pakistan.”
The line you reference was drawn across British India, the provinces ruled directly by Britain. In theory, the princely states were allowed to decide which state they would join, or they could remain independent. In practice, geography determined which state they went into.
However, in the obvious case of Kashmir, a Hindu rajah declared for India despite about 75% of his population being Muslim. That’s pretty arbitrary and artificial.