Get list of all Grandchild Pages

My current idea is:

  1. Use get_pages to get all of the descendants of TOP and put the IDs in an array arrayAll.
  2. Then run get_pages again with parent=1 to get just the direct children of TOP. Put these in array arrayChildren.
  3. Run in php arrayGrandchildren = array_diff(arrayAll, arrayChildren) to get a list of all pages from the first array (which contains all descendants of TOP) that do not include the direct children.
  4. In WP_Query, set ‘post_in=arrayGrandchildren&order=rand‘ to get random posts from the list of grandchildren.