Added array encoding + test.