If you deal with external hardware, you can trigger notes (and decide their note, velocity and destination track) with near-zero latency.
But when a lua script needs to trigger notes by itself, a noticeable latency is introduced, because then the event is generated in non-audio thread.
So, essentially what you want to do is possible - and precise - as long as you’re using something external to control the triggering.
A fixed duration is the only tricky thing to implement among the things you mention, because then you are back into the non-audio thread. But, it’s possible too - within a ~10ms time window.
Well, apart from the duration thing you could check out the Duplex Keyboard