Safely write filenames or file paths with any legal characters to an array using find with print0 and iterate through them. Of course, be sure to set appropriate criteria for find.
local -a files=()
local file=
while read -r -d ''; do
files+=( "$REPLY" )
done < <(find -type f -print0)
[[ ${#files[@]} -gt 0 ]] || {
printf "%s: Files were not found.\n" "$FUNCNAME" >&2
return 1
}
for file in "${files[@]}"; do
done