Hi @Chris.Lyons You can try the following script, which gathers the additional information on each file and drops it into an array. It keeps adding each file found along with the details into the array until its complete and then prints the results. The username and the path to each file are included in the results that the initial mdfind pulls, so there wasn't a need in my opinion to include that as separate information.
Since I don't have the specific Notes database files on my Mac, I can't test it against those types, but I did test it against other file types, like PDF, Pages, Word, etc.
#!/bin/bash
while read username; do
while read file; do
CDate=$(mdls "$file" -name 'kMDItemFSCreationDate' | awk '{print $3,$4}')
FSizeRaw=$(mdls "$file" -name 'kMDItemPhysicalSize' | awk '{print $3}' 2>/dev/null)
FSize=$((FSizeRaw / 1000))
## Add the above items into a running array
resulttmp+=("${file}:
Creation Date: $CDate
File Size: $FSize KB")
done < <(mdfind -onlyin /Users/$username -name 'kMDItemKind == "Notes database file" && kMDItemFSName == "*.nsf"')
done < <(dscl . list /Users UniqueID | awk '$2>500 {print $1}')
## If the array is not empty, print it as the result, respecting line breaks
if [[ "${resulttmp[@]}" != "" ]]; then
echo "<result>$(printf '%s
' "${resulttmp[@]}")</result>"
else
## Otherwise, print a 'None' result
echo "<result>None</result>"
fi
Hope it helps.