writeMany(indices, tensors) {
        if (indices.length !== tensors.length) throw new Error(`TensorArray ${this.name}: could not write multiple tensors,` + `because the index size: ${indices.length} is not the same as tensors size: ${tensors.length}.`);
        indices.forEach((i, index)=>this.write(i, tensors[index]));
    }
Helper method to write multiple tensors to the specified indices.