Handle both indexed and keyed arrays in Validator::each

This restores the ability to validate keyed arrays with `Validator::each` as per #4024 while still retaining the current API for for validating indexed arrays introduced in eb8daf2.