If you need to add a custom attribute to add in collection getData array. you need to add it in filter of addAttributeToFilter.
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$productCollection = $objectManager->create('Magento\Product\Model\Product\ResourceModel\CollectionFactory')->create();
$productCollection->create()->addAttributeToFilter('custom_attr', ['eq', '']);
Note -: Don’t use objectmanager directory, use dependency injection to create object.