add test for array element getter
move some common interfaces to CPL