add macro to switch array or linklist function.