If possible it would be nice having access to the function checking if a Wikidata entity matches an arbitrary type constraint. This would be very useful to achieve one of the long term objectives of the WikiProject Templates in eswiki.
The basic idea is merging all the infoboxes to a single one that can know the type of the entity and display the Wikidata properties of that entity that the community thinks that are relevant for that type of entity. For now the only ways I know to do something like this with Lua is maintaining a page with the mappings of what values of the "instance of" property go to each of them (which has a huge maintenance burden) or loading all the entities in the tree until we find the one we are looking for (which is probably better to avoid).
This is probably is probably already implemented in php for the checks of the constraint report page, so I don't think it will be too hard to implement.