title: Convert df's rows into matrices inside an array
body: <p>I have a <code>nxp</code> data frame and I want to convert it to an array with <code>n</code> matrices where each matrix is, let's say, <code>ixj</code> where <code>i+j = p</code>. Considering the following reprex:</p>
  
  <pre><code>library(tidyverse)
  
  df &lt;- tribble(
      ~x1, ~x2, ~x3, ~x4,
      1, 2, 3, 4,
      5, 6, 7, 8)
  </code></pre>
  
  <p>The desired result is an array with 2 matrices similar to the one produced by:</p>
  
  <pre><code>array(1:8, c(2,2,2))
  </code></pre>
  
  <p>Would anybody have an efficient method to obtain such results in high dimensional data frames?</p>