I am not sure what exactly you want but this is the basic idea.
So we start by creating a random field. Then we re-scale one of the values, after that we accumulate field and use it to set origin position and scale of the cubes.
The scale at index node group:
The frame produces a field full of 1 except at the selected index which is controllable. If you want to dynamically delete multiple cubes just repeat this node.
edit are you looking for something more like this? red cubes are editable and are randomly instanced on line.
The picture of a island size node.