Code modules, unlike Activity modules do not have a lifetime and are always present so cannot store UI related items as that would constitute a memory leak of stuff the garbage collector could not reclaim.
You could keep the Lists and Maps in the Activity, where the Views are only valid anyway, and pass them as parameters to the Subs in the Code module. As parameters are effectively local variables they will not retain the List or Map references once they return and hence do not keep a reference to anything containing a UI object and so cannot cause a memory leak.