Matching array contents against a glob is entirely possible:
#!/bin/bash
# this array has noncontiguous indexes to demonstrate a potential bug in the original code
array=( [0]="hello.c" [3]="cruel.txt" [5]="world.c" )
glob=$1
for idx in "${!array[@]}"; do
  val=${array[$idx]}
  if [[ $val = $glob ]]; then
    echo "File $val matches glob expression $glob" >&2
  else
    echo "File $val does not match glob expression $glob; removing" >&2
    unset array[$idx]
  fi
done
Similarly, you can expand a glob against filesystem contents, though you'll want to clear IFS first to avoid string-splitting:
# here, the expectation is that your script would be invoked as: ./yourscript '*.c'
IFS=
for f in $1; do
  [[ -e $f || -L $f ]] || { echo "No file matching $f found" >&2; }
  echo "Iterating over file $f"
done
That said, in general, this is extremely unidiomatic, as opposed to letting the calling shell expand the glob before your script is started, and reading the list of matched files off your argument vector. Thus:
# written this way, your script can just be called ./yourscript *.c
for f; do
  [[ -e $f || -L $f ]] || { echo "No file matching $f found" >&2; }
  echo "Iterating over file $f"
done
     
    
*.cisn't a valid regex. Are you trying to filter a list of files ? it appears that what you are trying to use is some kind of glob pattern.for file in *.c do #$file is your file donels *.cworks.