Aliases and functions are contained in aliases and functions, and one merely needs to print the keys of such. "Variables and arrays" is trickier; parameters may suffice?
print -lrl -- ${(k)aliases} ${(k)functions} ${(k)parameters}
(You may also need builtins, commands, and perhaps other things listed from print -l ${(k) and then mashing tab, assuming completion is enabled.)