Manually implement Promise.all() from scratch without relying on built-in helpers.
For this coding exercise, the function receives a JSON-compatible list of already-settled values and must return a new list containing the same values in input order. Do not call built-in aggregation helpers such as all, map, or asyncio.gather.
Signature: promise_all(values)
The function must support an empty list, duplicate values, nested values, and falsy values without changing them.
def promise_all(values):