function addArrays() {
//helper function to 'flatten' a 2-d array into 1-d array (e.g., from array[0][5] to array[5])
//receives 2-d array and returns 1-d array
const flat = (arr) => arr.reduce((a, b) => (Array.isArray(b) ? [...a, ...flat(b)] : [...a, b]), []);
//1. Get data column values as an array (array1)
var ss = SpreadsheetApp.getActiveSpreadsheet();
var ws = ss.getSheetByName("ArrayCombineSource");
var data = ws.getRange("A1:A12").getValues();
//flatten array
data = flat(data);
// 2. Get destination column range.
var destination = ss.getSheetByName("ArrayCombineTarget").getRange("C1:C12");
// 3. Get destination column values as an array (array2).
var destValues = destination.getValues();
//flatten array
destValues = flat(destValues);
// 4. For each value in array1, add that value to the same index in array2 and store in new array (array3).
array3 = []; //declare new array to hold new values
data.forEach( (num, idx) => {
array3.push([num + destValues[idx]])
})
// 5. Overwrite values in destination column with array3 values.
destination.setValues(array3)
}