You anthropomorphic analogy falls flat in its face because the algorithm does not "know" anything, not in any sense of the "know" word for sentient and rational creatures. The algorithm embeds an association between the text "Wonder woman" and actual artistic representations of Wonder woman included in the prior art it is trained on. When prompted, it can reproduce one (see the Copilot fail where it spited out verbatim copyrighted code including comments) or a remix of such representations and integrate them into the output. That's plain as day a derivative work.
The particular case you are referring too, style extraction, could be considered fair use assuming you can technically separate the base visual model from the output style and you can prove the training data for the output module is distilled into abstract, statistical quantities pertaining to that style, such as color palete, stroke weight etc. That sounds like a tall order and I would consider any AI-model trained with copyrighted works as tainted until that burden of proof is satisfied.