add extract_array method, which is more general than array (n-d, can hold arbitrary parameters constant)