Add sort method to MutableArray.