The numerical treatment of body forces, dislocation fields, and arrays of cracks in plane elastostatics problems