[algorithms.greedy] move scalarizing of 1d arrays