How can I calculate takeoff distance in a generic way? I want to build a generic performance app.

For many of the aircraft the only available method is using the takeoff charts manually (I'm not referring to the more simple-to-calc short field charts but to the charts which consider also the wind components).

Is there a way to convert these charts into numbers that allow me to calculate the output once certain parameters (weight, OAT, PA) are entered? Is this data available somewhere?
Or do pilots do it with chart and pencil for every flight?

(Not a pilot myself.)

example of takeoff chart :
For air carrier type aircraft, the chart you show in your question (sometimes called a "run-around-chart") is generally digitized in some form (performance data printed out on dispatch release, or in a Flight Management Computer on board the aircraft or handheld device provided to crews).

For light aircraft, likely there are many software apps available for the most popular types.

Here is a picture of an Apple APP I noted online for a Cessna 172.