The Reference Desk/Which K9s are separate entities?

From Tardis Wiki, the free Doctor Who reference

The page K9 too much of a mess for me to get a certain answer on the issue of which K9s can be lumped together as one entity over several Doctor-style "regenerations", and which are just different robots of the same model.

For sure, K9 Mark 2 was a regeneration of K9 Mark I, and K9 Mark IV was K9 Mark III rebuilt and augmented by the Tenth Doctor.

But did the K9 Mark II built by the Fourth Doctor have the memories of Mark I, making him a sort of clone?

And did Mark III have the memories of either Mark I or Mark II? He seems to care a lot about the Doctor in School Reunion (and vice-versa) in a way that suggests to me that he did, considering that otherwise, we don't know of any Doctor/Mark III adventures before he was gifted to Sarah Jane.

(I suppose it's hopeless to try and figure out where the comic version owned by the Tenth Doctor fits into this, though if I had to speculate, I would propose that that K9 was a duplicate of Mark III, created from a backup he made in School Reunion while building Mark IV.)