preliminary refactoring for supporting arrays and objects
add support for arrays