Converts arrays into objects.