All tips aiming to bend arm up to 90° ...
Enable under Armature modifier > Preserve Volume
I used Automatic Weight and manually set 0/1 weigt to bottom / top vertices.
As you can see upper and lower arm cubes are not cubes anymore, but you are able to rotate 90 degrees and some small inverting is happening too, but not as early and much as ...
The first thing to do is move the outer edge loops farther from the center edge loop.
Next set the weights of the edge loops in proportion to the distances. In my example, I'm using a "top" and "bottom" bone, because that's how I happen to have stacked the armature.
Here you can see the block with a UV checker material, with the top ...
You could link-duplicate both the object and the armature, reset the pose of the linked-duplicated armature, and weight paint the linked-duplicated object, you'll see the result on the original posed object.
The colors in the middle of a poly show the average of the weights of the poly's vertices. When the top two verts in a quad have weight 1 and the bottom two have weight 0, you see this:
This coloring shows you that if you move the pose bone for this group, the top verts will move which also pulls along the entire quad. Hence the whole quad is affected, so ...
You have selected the Select Box tool It's highlighted in Blue on your toolbar.
Select the top tool, the brush.
But you have also selected Paint Mask It's highlighted in blue in the header. Deselect it and you'll be able to paint
Imagine that the bone extends in both directions, but that the pivot point stays the same. Since the area that you weight painted is on the other side of the pivot point it will rotate in the opposite direction that you move the bone, because that's the direction the imaginary extension rotates in.
The problem is duplicated vertices and bad Custom Split Normals.
First, select the mesh (lowr_000_r_high), go to Edit mode, press A to select all, then M > Merge By Distance to get rid of 8871 duplicated vertices.
Furthermore, it looks like the mesh is optimized for a game engine. It has tris, Auto Smooth is enabled, and there is Custom Split Normals Data....
It is actually simple why it doesn't work, no need to worry, you just somehow pressed or activated this button:
This function allows you to select only vertices you want and you will be able to draw weights only for those vertices that are selected. It's basically a mask function for weight painting.
Turn it off by clicking it and it should let you draw ...
You need a way to correct the shape. You can try using corrective shape keys, or you can edit your geometry and weight paint to make the topology more likely to bend in the desired way.
See this answer for a detailed explanation of using weight painting and geometry to change the flexing.
Corrective Shape Keys is a add-on that is included in Blender but ...
Yes, the weights are stored in the vertex groups of the mesh that have the same names as the bones (DEF-spine.006, DEF-hand.R, etc). Regenerating the rig will not touch them.
Just don't use Parent To > With Automatic Weights. This will override your weight painting for sure. You can use Parent To > With Empty Groups (P) to parent the mesh to the rig ...
After watching a few videos, apparently this one button 'Vertex Selection', which is only seen by accessing 'Weight Paint' mode, enables this useful feature.
EDIT: You have to have weight data on any vertex on any object on the scene, for the column to become available.