In medieval India, who was responsible for maintaining law and order? Was it the army or was there a separate arm of the state that was responsible for law and order, something akin to a modern police force?
In medieval India, or, at least the portions ruled by Hindu empires (considered "Classical India" until the late 18th century), the functions of society were arranged differently than in modern nations or contemporaneous societies in Europe or Asia.
Most notably, the caste system played a very important part - different castes were responsible for different parts of jurisprudence. Brahmins were involved in creating and adjudicating law at a high level, where the Kṣatriya were responsible for promulgation of that law, punishing the wicked, protecting the people and adjudicating minor legal disputes - so the "warrior caste" was explicitly responsible for both war and law enforcement. In short, there was no difference between the police or army. Members of the Kṣatriya caste filled both roles.
Here's a wiki article on Classical Indian Law in Practice.