Update merkletracker to use arrays

Update merkletracker to work with new chainheaders and use arrays.