You can go about a few ways. To search everything, you can look through the Block collection. It includes, ModelSpace, PaperSpace, and BlockTables. If you are looking for certain "types" of entities, you can use the AcadSelectionSet to narrow your search based on entity parameters, and then search through those "found" entities.
"Everybody is ignorant, only on different subjects." — Will Rogers