Yes you can do this. The data has to be in a multidimensional array - like a matrix.
This sample shows how to paste an array of five values into a row, and also into a column
var sht = SpreadsheetApp.getActive().getActiveSheet()
var myRow = [[1,2,3,4,5]]
var myColumn = [[1],[2],[3],[4],[5]]
sht.getRange(1,1,1,myRow[0].length).setValues(myRow)
sht.getRange(1,1,myColumn.length,1).setValues(myColumn)
SpreadsheetApp.flush()
}