Yes definitely learn Ruby
Currently Dynamic Components are the best and "native" way of placing data and having some control over objects, whether "Live Components" are able to compete or excel will be years away.
So stick with Dynamic Components and learn how they can be controlled and improved on using Ruby.
For example the "redraw all" script kindly donated by Dan
https://forums.sketchup.com/t/redraw-all-dynamic-components/77512/10 might help, or placing a redraw onclick in the cube
However a clear picture of what you trying to achieve may help me to advise the best method.
array copies are generally y = copy*(leny+space)