Add flatten to benchmarks