Search if file exists for a file pattern stored in array

Hi experts,

I have two arrays one has the file paths to be searched in , and the other has the files to be serached.For eg
searchfile.dat will have

abc303
xyz123
 

i have to search for files that could be abc303*.dat or for that matter any extension . abc303*.dat.gz

The following code doesnt work if i give * , it works only if i give the exact file name to be searched in the searchfile.dat

#!/usr/bin/ksh
set -A filearray $(cat searchfile.dat)
fp1=/home/user/fp1
fp2=/home/user/fp2
fp3=/home/user/fp3
 
set -A filepath $fp1 $fp2 $fp3
i=0
j=0
 while [[ $i -lt ${#filearray[@]}  ]];do
 while [[ $j -lt ${#filepath[@]} ]];do
 found=0
 if [[ -a  "${filepath[$j]}/${filearray[$i]}"\* ]]; then
 echo ${filepath[$j]}/${filearray[$i]} "found"

Try the find command:

while [[ $i -lt ${#filearray[@]}  ]]
do
   find ${filepath[*]} -type f -name ${filearray[$i]}\* | xargs ls -l 
   i=$(( $i + 1))
done

Hi i tried with find and it says `${filepath
[*]}' also is not expected.