converted some more global_alloc_array() usage to dynamic_buffer/dynamic_array (nw)