Typescript Reduce Array And Arraylist