You can use `array_fill_keys` and avoid the flip and foreach.