You can construct a custom dictionary so that way you can look up faster, or else simple query API.
import bpy
# dict for mesh:object[]
mesh_objects = {}
# create dict with meshes
for m in bpy.data.meshes:
mesh_objects[m.name] = []
# attach objects to dict keys
for o in bpy.context.scene.objects:
# only for meshes
if o.type == 'MESH':
# if this mesh exists in the dict
if o.data.name in mesh_objects:
# object name mapped to mesh
mesh_objects[o.data.name].append(o.name)
print(mesh_objects)
I don’t know if there’s this method. I will keep an eye though in case I find something about it.
As for what I mentioned earlier, you can use this code on demand when you need to, otherwise you can turn it into a blender API extension (an API that will query the application for various information).
As for example you can drop it in a file here blender28\2.83\scripts\modules and then have this functionality out of the box (however this makes your scripts very customized – not easy to distribute).