The Raster to Point tool is the easiest way to convert a raster to point elevation. The Extract Values to Points tool will extract values from an underlying elevation raster to an existing points feature class/shapefile.
If you have 3D Analyst, you can use the Interpolate Shape tool to convert your line to 3D based off of an elevation raster. There is an option within this tool for the interpolation to use the input vertex locations.
You can extract the endpoints from lines using the Feature Vertices to Points tool. Choose the option BOTH_ENDS for the Point Type.