custom fns for array_flip, array_filter and array_fill