Having a creature roam freely is hard, because of chunkloading. Chunks are loaded around the player. In the loaded chunks, plants grow, tile entities (like furnaces) "tick" and entities like mobs move.
As the player travels, chunks in front of them get loaded and chunks behind them get unloaded.
This would mean that a wandering creature, even one that is limited to moving within a radius around a specific location, would get "frozen" when all players leave their vicinity.
Furthermore, if it belongs to a structure, then it would need to be generated along with that structure. And since players are most likely to find any random structure while they are actively exploring the world, they would most probably find the creature still wandering very close to the structure, since it did not get the time to wander further from the structure.
An idea that I would find more appropriate myself would be a creature that roams in an area that gravitates around the player themselves, rather than a structure. Also, in programming logic, the movement/location of this creature could be controlled from outside the "entity" so it can "move" in unloaded chunks. I mean that the creature Entity itself only exists when the Controller says that it is close enough to the player and in a loaded chunk.
Actually, I think that this could be very well combined with some aspects of the original idea.