Problem/Motivation
PHP 8.4 will be released after Drupal 11, meaning we won't be able to use new features until we drop support for PHP 8.3. Fortunately symfony provides polyfills for many of these functions.
Steps to reproduce
Proposed resolution
Add symfony/polyfill-php84. Modernize some areas of core to use array_find, array_all, array_any and other related functions. \Drupal\Component\Assertion\Inspector
is a good place to start because it has many related functions and has good unit test coverage