REF: do length-checks in boilerplate decorator
The PR #34081 was reverted due to its impact on length-checks in Index special cases with tuples.

And the refactor is still nice for the cleanup but needs to have appropriate changes to avoid this issue.
