What is the best way to get array in some drupal data
I'd recommend you to look at entity_metadata_wrapper() function which comes with the Entity API module.


  The Entity API provides wrapper classes you may use to make dealing with the values of an entity's properties and fields easier. Wrappers make it easier to get and set the values of fields and properties as well as to programmatically retrieve additional information about these elements and iterate over lists of values in a consistent manner.


For example, using entity_metadata_wrapper() you can modify a field (or a "subfield" with your terms, I think you mean a field in a field collection) in a following way:

// You should first wrap your node with entity_metadata_wrapper().
$node_wrapper = entity_metadata_wrapper('node', $node);

// To get the value of a field
$field_value = $node_wrapper-&gt;field_example-&gt;value();

// To get the value of a field in a field collection etc.
$field_value = $node_wrapper-&gt;field_example-&gt;sub_field_one-&gt;value();

// To set/modify the value of a field in a field collection etc.
$node_wrapper-&gt;field_example-&gt;sub_field_one-&gt;set('Some new value');

// To save the entity after modifying some values
$node_wrapper-&gt;save();