add methods for converting arrays to lists and back