Create custom field type with dynamic data
You should have a look at the LJ Dynamic Fields plugin, it sounds like everything you’re after is already doable with this plugin and if not, you can study the code or build upon it.