$multiSelectData = ['option1', 'option2', 'option3', 'option4', 'option5'];
$data = array(
'attribute_set' => 'Default',
'group' => 'Autosettings',
'type' => 'text',
'backend' => '',
'frontend' => '',
'label' => 'YOURATTRIBUTELABEL',
'input' => 'text',
'class' => '',
'source' => '',
'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
'visible' => true,
'required' => false,
'user_defined' => true,
'default' => '',
'searchable' => true,
'filterable' => true,
'comparable' => true,
'visible_on_front' => true,
'used_in_product_listing' => true,
'unique' => false,
'apply_to' => '',
'is_used_in_grid' => true,
'is_visible_in_grid' => true,
'is_filterable_in_grid' => true,
);
if (!$multiSelectData === false && is_array($multiSelectData)) {
$data['input'] = 'multiselect';
$data['option'] = array('values' => $multiSelectData);
$data['backend'] = 'Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend';
}
NOTE
Into this code, $multiSelectData
which show as array static, you can create those array from your dynemic grid collection value. So it will show options from your customize grid.