Callback-based array decorators for PHP