Introduce `isArray`
Clean up array checks with `isArray`