Convert arrays into lists