Typescript Add To Array Conditionally Independent