Typescript Find Element Index In Array Python Vs List