cast paths to array