public List<Long> toList() {
            ArrayList<Long> list = new ArrayList<>(indexes.length);
            for(long index : indexes) { list.add(index); }
            return List.copyOf(list);
        }
Returns an immutable list containing a copy of the indexes in this
vespajlib/src/main/java/com/yahoo/tensor/IndexedTensor.java