Remove the array index accessor.
E.g., ['a', 2, 'b', 0] => ['a']
['a', 'b', 0] => ['a', 'b']
If the `requiredMinLen` is 2,
then ['a', 2, 'b', 0] => ['a', 2]
['a', 'b', 'c', 0] => ['a', 'b', 'c']

@inner
@param {Array.<string|number>} paths the data access paths
@param {number=} requiredMinLen the minimum length of the processed paths after
array index accessor removed, by default no limit.
@return {Array}
function removeArrayIndexAccessPath(paths, requiredMinLen) {
    let result = [];

    // using 0 stand for no limit for the processed paths length
    requiredMinLen || (requiredMinLen = 0);
    let currNum = 0;
    for (let i = 0, len = paths.length; i < len; i++) {
        let item = paths[i];
        if (typeof item === 'number' && currNum >= requiredMinLen) {
            break;
        }
        result.push(item);
        currNum++;
    }
    return result;
}