I’m a bit confused about the syntax of the solutions.
It is a fairly new feature called operator (overloading).
If you consider at least 24 years as “fairly new”, then yes, operator overloading is new

No the read and write family of functions (as well as some others) are not functions at all and don't follow any rule for function parameters. They are just compiler magic. There is no way, not with array of const, nor with generics or any other in language feature of Pascal to write a function that behaved like read or write(ln)
I'll take your word for it.
Warfly is right about that. A
Write(Ln/Str) or
Read(Ln/Str) call is decomposed into multiple different calls which is what allows it an essentially infinite number of parameters without it being declared as such anywhere. Not to mention support for the
<IDENTIFIER>:<NUMCHARS>:<DECIMALS> syntax (which is also supported by the
Str intrinsic).
OTOH, if i remember correctly, in assembly a Function is still a "procedure" with the "difference" being that the result-value is passed as the "last" parameter as an "out"-param (in a special (?) register)
(i don't know the "words" to describe it better)
There is a certain ABI one is expected to follow in assembly language that is also followed by higher level languages. This allows interoperability between languages. In general there is a single register that is designated as a result register. For
i386 that's the
EAX register, for
x86_64 RAX, for
ARM it's
R0, for
Aarch64 X0 and so on.
out (or
var) parameters on the other hand are essentially passed as pointers to the passed in variable. So, yes, there is a difference between functions and procedures with
out/
var parameters.