array_limited test refactored