The article isn’t describing someone who learned the concept of sortable IDs and then wrote their own implementation.
It describes copying and pasting actual code from one project into a prompt so a language model can reproduce it in another project.
It’s a mechanical transformation of someone else’s copyrighted expression (their code) laundered through a statistical model instead of a human copyist.
“Mechanical” is doing some heavy lifting here. If a human does the same, reimplement the code in their own style for their particular context, it doesn’t violate copyright. Having the LLM see the original code doesn’t automatically make its output a plagiarism.