If you are dead set on avoiding intermediates, I much prefer something like this:
```ruby
payload = payloads.select { |p| 
  element.altered_value.include?( p ) 
}.sort_by { |p| p.size }.last
```