Basic template for executing a series of async functions on an array before calling an onComplete function