Implement Array.bsearch in cfunc

related #2114