Making a binary tree using an array in C
Do not cast the malloc value. It serves no purpose, and may mask a serious problem.
Allocating sizeof(TreeNode) assumes the knowledge of the type of resTree.root, and results in the double maintenance. A preferred idiom is malloc(sizeof(*resTree.root)).
As written, the node tests for validity of its (future) children. It is more natural for the node to test its own validity:

if (size == 0) {
    return NULL;
}

halfSize = size/2;
if (arr[halfSize == -1) {
    return NULL;
}

resTree.root = malloc(sizeof(*resTree.root));
resTree.root-&gt;data = data;
resTree.root-&gt;left = BuildTreeFromArray(....).root;
resTree.root-&gt;right = BuildTreeFromArray(....).root;

return resTree;

I don see a reason why TreeNode is wrapped into Tree. More context would be nice.