Well it is doable, sort of.
Only dynamic entities are available to Lua scripts so it is a relatively simple matter to attach a script to all the entities that you want to appear and have the script add them to a searchable list, then when plotting the terrain the list could check to see if that particular x,z point is 'inside' any of the entities, if it is then the point could plot in a specific colour (or a colour determined from what the entity is, maybe from its name).
In order to do this you would have to create a list of all the entities you want to attach the script to and in the list have the length&width dimensions for the entity, then at runtime build a list of entities with any point within the display area with x,z points of the corners.
The math for all this would be quite a challenge as entity rotation must be taken into account.
As long as you didn't have thousands of entities it may be ok performance wise.
Static entities otoh are a different matter, unless someone can persuade Lee to provide access to them via Lua but that may be totally impossible for performance reasons, imagine painting plants and trees and boulders into a relatively 'empty' level, how is the engine to know which of these need to be 'visible' to Lua scripts?
-- Alternatively --
As the script stands it will display 'objectives', so you could put objective points around some entities which would show up as a dotted outline. You may need to edit the constant in the script that specifies the maximum number of objectives (f you make this constant too big you may run out of sprites btw) also you may want to change the objectives script to not delete them when you approach them.
Been there, done that, got all the T-Shirts!