Assume there are $m$ rows and $n (n \leqslant m)$ columns, then the maximum value is at least $m+n-2$, because by selecting any row and column, and coloring all points in these row and column except their common point in red, it satisfies the condition.

Below, we use mathematical induction to prove that in an $m \times n$ grid, the number of red points $\leqslant m+n-2$.
When $n=2$, if the number of red points is $m+n-1=m+1$, then there must be a row with 2 red points, which means the other points in these two columns cannot be red, leading to a contradiction!

When $n=3$, if the number of red points is $m+n-1=m+2$, then there must be a row with 2 red points, which means the other points in these two columns cannot be red, and the other column can have at most $m-1$ red points, leading to a contradiction.

If for $n \leqslant k$, in an $m \times n$ grid, the number of red points $\leqslant m+n-2$, assume for $n=k+1$, in an $m \times n$ grid, there are $m+n-1=m+k$ red points. By the pigeonhole principle, there must be a row with 2 red points, and in the columns of these 2 red points, there are no other red points. Removing these two columns, we get an $m \times (k-1)$ grid with $m-k-2$ red points, which contradicts the induction hypothesis.

Therefore, in an $m \times n$ grid, the number of red points $\leqslant m+n-2$.
In conclusion, the maximum value of $k$ is $m+n-2$.
Example 4 Given that $m, n$ are integers greater than 7, consider a rectangular array of $m \times n$ points. Color $k$ of these points red, such that the three vertices of any right-angled triangle with its two legs parallel to the sides of the rectangle are not all red points. Find the maximum value of $k$.