The UN has twice called on Australia to dismantle its indefinite detention system for people with cognitive impairments and mental illness, which disproportionately affects Indigenous people.