Execute an Array of Promises Sequentially One After Another
Given an array of promise-returning functions (not promise objects), write a function that executes them one by one in strict sequence — the next task only begins after the previous one completes. Use reduce() or an async loop to chain them. Return either a final accumulated result or an array of all resolved values. This is essential for ordered side-effects like sequential API calls, database migrations, or upload queues.