private static boolean mapContent(TensorAddress from, Label[] to, int[] indexMap) {
        for (int i = 0, size = from.size(); i < size; i++) {
            int toIndex = indexMap[i];
            Label label = from.objectLabel(i);
            if (!to[toIndex].isEqualTo(LabelCache.INVALID_INDEX_LABEL) && !to[toIndex].isEqualTo(label))
                return false;
            to[toIndex] = label;
        }
        return true;
    }
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/Join.java