For achieving this you can use below snippet: Store the function response in var of type array and connect it to a message carousel node and use the fetch from option. Attached screenshot for your reference.
return new Promise(resolve => {
let cars_cards = [];
cars_cards.push({
"image": "https://cdn.yellowmessenger.com/ge4malroGcAN1594658356529.png",
"text": "Place to add text message",
});
console.log("------------------after Entering the for lop----------------------------")
return resolve(cars_cards);
});