You examine the interfaces which a particular layer implements. All layers implement ILayer. If you open up the documentation link for the interface, you will see which classes implement this general interface.
Common layer types (in context of your question) are FeatureLayer (implements IFeatureLayer among others), GroupLayer (ICompositeLayer, IGroupLayer) etc. You get the idea - when exploring the plethora of interfaces layers can implement, it's good to refer to the list of classes implementing ILayer as a great starting point.
As for the second part, layers which are not connected due to an inaccessible data source will typically be marked as invalid (red exclamation mark). The ILayer.Valid indicates whether this is or is not the case.
Finally, the third part of your question. Layer indices are assigned either at the top level (the index which goes as a parameter to IMap.Layer) or within a particular layer container, e. g. a composite (group) layer. The only way to get retrieve the index for an existing layer is to loop through the map or a composite layer and compare the items. This will work only at a single level and will not work reliably when layers are nested with group layers. That being said, layer indices are generally not a good idea to refer to layers.