Can you implement the whole thing on an arduino, ...... and making use of tri-state?
Yes you probably can but I would have thought only for one type of transistor (PNP or NPN).
I'm not sure where you'd put the A-D converter for measuring gain.
That is the tricky part, as it stands the A/D converter is wired up as a single ended measuring system. That is it always measures the voltage with respect to ground. You can configure them to be differential in the chip so as to allow you to measure the voltage across a resistor (and hence the current through it).
Alternatively if you have an analogue input to each of the raw transistor pins I am sure with a bit of clever maths and knowledge of what the other pins are doing you could work out the current.