8 – Edit Field in Custom Content by adding #states property

I have custom content and there are fields, for example field “dog_name”. I declared those fields in .yml files. I have a question – is it possible to edit them programmatically and add to them #states property? I need one field showing after choose particular option in other field. I found how to do it with forms, but i need to do it with fields. I know that Drupal has conditional module, but I need to implement it without any external modules.