It looks like  code below would give me what I am looking for. Just need to figure out (or take an advice!) how to exclude, say, system classes outright. 

rs=##class(%ResultSet).%New("%Dictionary.ClassDefinitionQuery:ClassIndex")
x=rs.Execute()
f  {
x=rs.Next() q:'x
TimeChanged=rs.GetDataByName("TimeChanged")
ClassName=rs.GetDataByName("ClassName")
Hash1=rs.GetDataByName("Hash1")
Hash2=rs.GetDataByName("Hash2")
System=rs.GetDataByName("System")
ClassType=rs.GetDataByName("ClassType")
Size=rs.GetDataByName("Size")
}
P.S. Found the answer to my last question: https://cedocs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?PAGE=CLASS&LIBRARY=%25SYS&CLASSNAME=%25Library.RemoteResultSet