Convert an array to a list.