Менее ортодоксальный подход:
function merge2Arrays() {
var array1 = [['r1c1', 'r1c2', 'r1c3'],['r2c1', 'r2,c2', 'r2c3']];
var array2 = [['r1c4', 'r1c5'],['r2c4', 'r2c5'],['r3c4', 'r3c5']];
const ss=SpreadsheetApp.getActive();
const sh=ss.insertSheet('xxxxx');
sh.getRange(1,1,array1.length,array1[0].length).setValues(array1);
sh.getRange(1,array1[0].length+1,array2.length,array2[0].length).setValues(array2);
const a=sh.getDataRange().getValues();
ss.deleteSheet(sh);
ret a;
}
function merge3Arrays() {
var array1 = [['r1c1', 'r1c2', 'r1c3'],['r2c1', 'r2,c2', 'r2c3']];
var array2 = [['r1c4', 'r1c5'],['r2c4', 'r2c5'],['r3c4', 'r3c5']];
var array3 = [["r1C6"],["r2c6"],["r3c6"],["r4c6"],["r5c6"],["r6c6"]];
const ss=SpreadsheetApp.getActive();
const sh=ss.insertSheet('xxxxx');
sh.getRange(1,1,array1.length,array1[0].length).setValues(array1);
sh.getRange(1,array1[0].length+1,array2.length,array2[0].length).setValues(array2);
sh.getRange(1,array1[0].length + array2[0].length + 1,array3.length,array3[0].length).setValues(array3);
const a=sh.getDataRange().getValues();
ss.deleteSheet(sh);
SpreadsheetApp.getUi().showModelessDialog(HtmlService.createHtmlOutput(JSON.stringify(a)), "Display Array");
}