Resolve an array of promises