I think here 猫 can be either an environment or an variable.
Environment & variable vs topic & subject:
I think this environment model explains things betther than the use of the terms "topic" and "subject", at least for me.
I took inspirations from following sources:
a) Lesson 3: WA-particle secrets schools don't ever teach. How WA can make or break your Japanese (by Cure Dolly)
I am certainly no expert in Japanese it's been more than 20 years since I lived there.
But one of my ways of understanding は and が is like in them to the articles "the" and "a". The former is talking about something that has not been mentioned before, or is unique. The latter is referring to an object that the listener knows.
To use your programming analogy, maybe it's like differentiating between an object and a class.
I personally had one or two issues with the video you used. I'm not sure they were being literal when they said は means "as for". は doesn't have any meaning, it has a function. Translating it this way can help people understand how は works within the sentence, but I've also seen it confuse people too. I once saw a post from someone who said 私は難しい incorrectly thinking it meant "It's difficult for me."
Some of the things you mentioned also weren't accurate.
a) Generally speaking, cats are liked [猫が好きだ]
b) As for me, cats are liked (-> I like cats) [私は猫が好きだ]
Sentence B is correct. Sentence A however is just sentence B with the subject/topic omitted. You'll have to infer the it from the context, but it will be "I" in most cases. I don't think there will be any context in which it will be understood as cats being generally liked by everyone.
a) Generally speaking, as for cats, everything about cats is liked. [猫は好きだ]
c) As for me, as for cats, everything about cats is liked. (-> I like cats) [私は猫は好きだ]
There are a few issues here that are a little misleading. は好き can be used like this, but in my experience of looking at sentence from native Japanese speakers, it's mostly only used in the following three ways:
Comparisons, for example 私は猫は好きですが、犬は好きではありません (I like cats, but I don't like dogs.)
Together with a conjunction like ですが、ですけど、でも, for example 私は猫は好きですが、飼ったことはありません (I do like cats, but I've never had one.)
Together with になる, for example 私は猫は好きになれませんでした (I wasn't able to become a cat lover.)
Number 2 and 3 can be replaced with が, but は is preferred for number 1.
私は猫が好き also doesn't quite mean you like everything about cats. It's the same as saying you like cats in English, you're making a general statement without specificially identifying what you like about them. I like everything about cats is closer to 猫の事が好きです or 猫の全てが好きです.