Factor out common code for converting table of strings to buffer array