Assuming you have an object with keys that match the column headers, this script will create an row array in the precise column order.
const headers = sheet.getRange(1, 1, 1, sheet.getLastColumn()).getValues()[0];
let requestArray = [];
headers.forEach(function(key){
if(requestObj.hasOwnProperty(key)){
requestArray.push(requestObj[key]);
} else {
requestArray.push("");
}
})