India’s apex court directed the government to formulate a national policy framework to address the crisis of undertrial prisoners languishing in overcrowded jails.