Typescript Remove Item From Array While Iterating Map In C