What I commented is how to do it. I assume you’re storing this array in a cache/session where it’s semi-persistent right? What you want to do is append the item to the array. Say your array looks like this:
$modules = array(
'Forums' => array('file' => 'link/to/file.php', 'enabled' => TRUE),
.....etc
);
All you need to do is add it to the array:
$modules['Example_Module'] = array('file' => 'link/to/this/module', 'enabled' => TRUE);
Which will allow you to continue using that include code block you have.
See this: Example
It sticks to the structure you require.
1
solved Add values to complex array