Here is a quick and dirty sample script to do what you want in practice:
for i in $PATH; do
for j in "$i"/$1; do
[ -f "$j" ] && [ -x "$j" ] && printf '%s\n' "$j"
Save this as e.g.
whichglob and make it executable. Sample run:
$ echo $PATH
$ ./whichglob grep*
Actually all the functionality in
-a, exit statuses, multiple file match inputs) can be easily added in this shell script context as well, but I leave that as an exercise for the reader.