TensorAddress combine(TensorAddress match, TensorAddress leftOnly, TensorAddress rightOnly, int concatDimIdx) {
            Label[] labels = new Label[plan.resultType.rank()];
            int out = 0;
            int m = 0;
            int a = 0;
            int b = 0;
            for (var how : plan.combineHow) {
                switch (how) {
                    case left -> labels[out++] = leftOnly.objectLabel(a++);
                    case right -> labels[out++] = rightOnly.objectLabel(b++);
                    case both -> labels[out++] = match.objectLabel(m++);
                    case concat -> labels[out++] = LabelCache.GLOBAL.getOrCreateLabel(concatDimIdx);
                    default -> throw new IllegalArgumentException("cannot handle: " + how);
                }
            }
            return TensorAddressAny.ofUnsafe(labels);
        }
Maps the content in the given list to the given array, using the given index map.

@return true if the mapping was successful, false if one of the destination positions was
        occupied by a different value
vespajlib/src/main/java/com/yahoo/tensor/functions/Concat.java