glsl: Split process_block_array into two functions