title: Method for splitting array into (element => remaining elements) pairs
body: <p>Given an <em>array literal</em>, I would like to create a hash where the keys are the elements from the array and the values are arrays containing the other / remaining elements.</p>
  
  <p>Input:</p>
  
  <pre><code>[1, 2, 3]
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>{1=&gt;[2, 3], 2=&gt;[1, 3], 3=&gt;[1, 2]}
  </code></pre>
  
  <p>It's easy if I introduce a variable:</p>
  
  <pre><code>arr = [1, 2, 3]
  arr.map { |i| [i, arr - [i]] }.to_h
  </code></pre>
  
  <p>But with an array literal, the only solution I could come up with involves <code>instance_exec</code> or <code>instance_eval</code>, which seems hackish:</p>
  
  <pre><code>[1, 2, 3].instance_exec { map { |i| [i, self - [i]] } }.to_h
  </code></pre>
  
  <p>Am I overlooking a built-in method or an obvious solution? <code>group_by</code>, <code>combination</code>, <code>permutation</code> and <code>partition</code> don't seem to help.</p>