Create New Array From Existing Array Typescript Interview