$items = ArrayHelper::map($cities,'id','name');
<?= $form->field($search, 'fullname', ['options'=>['list'=>'datalist1']]); ?>
<datalist id="datalist1">
<?php foreach($items as $city): ?>
<option value="<?php echo $city?>">
<?php endforeach; ?>
</datalist>