Adds support for arrays
Merge branch 'array' into patched