Do you mean twig_slice instead of array_slice ?