This could just be an index_by call...

```ruby
processed_data.index_by { |d| d[index_key] }
```

which means you probably don't need a whole method, since the callers will be clear enough.