requireNewlineAfterArrayItems: impl

Fixes #317
seems like these 2 loops can be done as one. Also, please use `forEach` to avoid unnecessary variables.