Can I use an Array with isOpen()?

So we’re all familiar with the use of isOpen() to set active styling in a nav for a page and its children. However, I have a nav where items are showing under a “products” nav item, but they’re actually all top-level URLs (not my choice).

So I know that I can do a bunch of or options in the conditional statement, but is it possible to pass an array of pages to isOpen() to make my code less cluttered and easier to maintain?

Maybe something like this:

<nav class="navigation column" role="navigation">
  <ul class="menu">
    <?php 
       $pageArray = array('page-1', 'page-2', 'page-3'); 
       foreach($pages->visible() as $item): ?>
      <li class="menu-item<?= r($item->isOpen() || ($item->uid() == 'products' && in_array($page->uid(), $pageArray)), ' is-active') ?>">
        <a href="<?= $item->url() ?>"><?= $item->title()->html() ?></a>
    </li>
    <?php endforeach ?>
  </ul>
</nav>

Thanks, that got me headed down the right path.

in_array(kirby()->request()->path()->first(), $productpages) seems to be good for my specific scenario.