Get all fields connected to an entity
You can get an entity type or bundle's field structure with field_info_instances(). e.g.

// Get metadata for all fields attached to the article content type.
$instances = field_info_instances('node', 'article');