Render arrays
Render arrays are a core part of the Render API that is responsible for transforming markup representations into actual markup.
Acknowledging my limits as a writer, I will defer to the definition found in the Drupal.org documentation, which best describes what render arrays are:
Simple, but powerful.
One of the principal reasons behind having render arrays is that they allow Drupal to delay the actual rendering of something into markup to the very last moment. This means we simply construct render arrays and by the end of the request, Drupal will know how to turn them into markup. This way, modules and themes can intercept them at various levels in the process and make alterations.
We will now talk about render arrays and the different aspects of working with them.
The structure of a render array
Render arrays are rendered...