feat(btoa): port and modify from Array.findindex

array_findIndex