How to get all components in level blueprint

yes you can get all the the static meshes in the level.
Use GetAllActorsOfClass to get all the actors in the level of a specified class.

Actor class should be StaticMeshActor for static meshes.

However, do not use this in a tick function if your world has thousands of actors. It is really slow.