Element API unable to get all() of matrix field
Figured it out in the end. As an array is being returned I just needed a for loop to get inside it.

Solution...

                    if($entry-&gt;relatedContent){
                        $index = -1;
                        foreach ($entry-&gt;relatedContent-&gt;all() as $block) {
                            switch ($block-&gt;type-&gt;handle) {
                                case 'relateContent':
                                    $index++;
                                    $relatedFeaturedEntries =  $block-&gt;featured-&gt;first();
                                    $relationsData[$index] = [
                                        'title' =&gt; $relatedFeaturedEntries-&gt;title,
                                        'url' =&gt; $relatedFeaturedEntries-&gt;url
                                    ];

                                    $relationsData[$index]['subItems'] = [];
                                    $relatedSubEntries =  $block-&gt;related-&gt;all();
                                    foreach ($relatedSubEntries as $relatedSubEntry) {
                                        $relationsData[$index]['subItems'][] = [
                                            'title' =&gt; $relatedSubEntry-&gt;title,
                                            'url' =&gt; $relatedSubEntry-&gt;url
                                        ];
                                    }
                                break;
                            }
                        }
                    }