If anyone else finds a need for it, this is what we ended up using:
Property:
Homebrew Casks
Relevance:
if (family name of main processor contains "Apple" AND exists file "/opt/homebrew/bin/brew" AND exists folder "/opt/homebrew/Caskroom" whose (number of folders of it > 0)) then ((names of it, names whose (it != ".metadata") of folders of it) of folders of folder "/opt/homebrew/Caskroom" as string) else if (family name of main processor does not contain "Apple" AND exists file "/usr/local/Homebrew/bin/brew" AND exists folder "/usr/local/Caskroom" whose (number of folders of it > 0)) then ((names of it, names whose (it != ".metadata") of folders of it) of folders of folder "/usr/local/Caskroom" as string) else ("N/A")
Property:
Homebrew Formulae
Relevance:
if (family name of main processor contains "Apple" AND exists file "/opt/homebrew/bin/brew" AND exists folder "/opt/homebrew/Cellar" whose (number of folders of it > 0)) then ((names of it, names whose (it != ".metadata") of folders of it) of folders of folder "/opt/homebrew/Cellar" as string) else if (family name of main processor does not contain "Apple" AND exists file "/usr/local/Homebrew/bin/brew" AND exists folder "/usr/local/Cellar" whose (number of folders of it > 0)) then ((names of it, names whose (it != ".metadata") of folders of it) of folders of folder "/usr/local/Cellar" as string) else ("N/A")