[cleanup] Replaced runtime-sized array by dynamic allocation

While gcc supports them (as extension) runtime sized arrays
are not standard c++. They are not even contained in c++14
but postponed to a later TS.