__expand, __expand_array: separate __expand_array from __expand