How to make properties of an existing Component "driven" by script?

Does anyone know if there is a way to take control of another component’s properties in the inspector in a script? Think something along the lines of how when you create a Canvas object, there is the little warning on the RectTransform that says “Some values driven by Canvas,” and then all properties on that component are grayed out. For example, I have a script that renders a circle by adding a bunch of positions to a LineRenderer. I would like to make the LineRenderer’s “Positions” array inaccessible in the inspector, and have them “driven” by my script, like the Canvas’ RectTransform. Anyone know if this is possible with custom editors or anything?

@Mons657, Have a look here: Unity answer from 2013 on read only fields in inspector

I was just on another thread bringing up something you’ve hinted at with your question. The reason you want these fields read-only is because you don’t want a user-programmer (yourself perhaps) messing with them.

I’ve often thought that while it is convenient to edit values in the property inspector of scripts, it promotes brittle solutions. If the code says a value should be initialized to, say, .5, but the inspector has been used in experiments to adjust it to .85 to make it work, there’s nothing that prompts one to go back to the code and change the code to reflect that. If that code works, everyone seems happy.

Until they try to use that same code in another project. The problem gets left in the code, and the solution is in the editor’s settings of the original project.