Add support for list, fix array implementation, add array functions