Using external conditions with functions in bash

As a part of my bash script, I am dealing with the optimization of some function, which take input csv file(s) and process it via some AWK script. This is the function, which operates on input file(s):

rescore_data () {
# accepting $str file(s) given outside the function in bash
echo "DEBUG info: The following CSV file is being processed:" $str
str_name=$(basename ${str} .csv)
printf >&2 "Dataset for ${str_name} is being rescored...  "; sleep 0.1 
mkdir ${rescore}/${str_name}
# applying this AWK code on many directories, each of which contains target csv file(s)
while read -r d; do
awk -F ", *" '# SOME AWK CODE and save output inside the same directory (d)                
'  "${d}_"*/${str} > "${rescore}/${str_name}/"${d%%_*}".csv" 

And this is control flow how this function may be called inside of bash script according to two different conditions defined manually (1 – operating just with one file; 2 – loop over several filles from list and process each by the function):

# list of target CSV filles
strategies=('*str1.csv' '*str2.csv' '*str3a.csv' '*str3b.csv')
if (( "${MY_FILT_METHOD}" == 1 )); then
   # this is a target file present in each of the directories
   # run rescore_data function to process it
  elif (( "${MY_FILT_METHOD}" == 0 )); then 
   # in each dir there are several target filles, defined in the array list
   for str in ${strategies(@)}; do
   echo "GREAT NEWS: when you see this message, you code is wrong!"

May this workflow be modified to automatically define the variable $str inside the function according to the same variable provided in the control flow IF conditions part?