Add `isArray` dep to `_.invoke` and optimize it for arrays.