I am creating a custom form and want to render the form field using the FieldStorageConfig and FieldConfig. Fields (my_field) could be any type those are supported by FormAPI.
$field = FieldStorageConfig::loadByName('node', 'my_field');
$field_instance = FieldConfig::loadByName('node', 'my_content_type', 'my_field');
$form['duplicate'] = [
'#title' => 'Get the title form my_field',
'#type' => 'Get the type form my_field',
'#other_properties' => 'Get all form element properties'
];
FieldConfig
as their class.