[BUGFIX] Refactor TCA rendering

Releases: 6.2
Resolves: #50064

Change-Id: Id65475511e07a76986dd2e7dae1b37ebcdf32957
Reviewed-on: https://review.typo3.org/28961
Reviewed-by: Nico de Haen
Tested-by: Nico de Haen