You can use the Extent of the raster to get the lower-left, lower-right, upper-left, and upper-right points and just add these to a new polyline or polygon feature class.
inputRaster = r"C:\MyRaster"
desc = arcpy.Describe(inputRaster)
ext = desc.extent
ll = ext.lowerLeft
ul = ext.upperLeft
lr = ext.lowerRight
ur = ext.upperRight
arcpy.CreateFeatureclass_management(r"C:\Documents\ArcGIS\Default.gdb","extentoutput", "POLYGON")
outFC = r"C:\Documents\ArcGIS\Default.gdb\extentoutput"
array = arcpy.Array([ll, ul, ur, lr])
pg = arcpy.Polygon(array)
with arcpy.da.InsertCursor(outFC, ["SHAPE@"]) as cursor:
cursor.insertRow([pg])
Edit: If you want it as a polyline output FC, then be sure to add the starting point at the end to "close" the polyline as a bounding box:
inputRaster = r"C:\MyRaster"
desc = arcpy.Describe(inputRaster)
ext = desc.extent
ll = ext.lowerLeft
ul = ext.upperLeft
lr = ext.lowerRight
ur = ext.upperRight
arcpy.CreateFeatureclass_management(r"C:\Documents\ArcGIS\Default.gdb","extentoutput", "POLYLINE")
outFC = r"C:\Documents\ArcGIS\Default.gdb\extentoutput"
array = arcpy.Array([ll, ul, ur, lr, ll])
pl = arcpy.Polyline(array)
with arcpy.da.InsertCursor(outFC, ["SHAPE@"]) as cursor:
cursor.insertRow([pl])