REF/TST: Add type hinting, add more tests for arrays