Get Index In Array Filter Javascript Array Of Functions