Use linked list for runmode lookup

Change from using an array to a simple linked list structure, allowing
dynamic insertion.