Disclaimer: without knowing the application, number of records, number of fields, frequencies of adding, deleting, changing scroll direction, ad nauseum, it is quite impossible to comment on whether you are looking at good code or bad; and whether the following code is even practical.
define subroutine fill-array
** here you would have the READ or FIND that acquires the records for the arrays
** I would also (maybe) have an array of the ISNs.
for #loop = #start to #end
display #field1 (#loop) #field2 (#loop)
at end of page
input ‘position cursor and hit pf5 for delete’ / ‘hit pf3 to do an add’
If the user wants to do a delete pick up #isn (#line) and null out that entry in the arrays. you could also “close ranks” in a variety of ways. You could have logic in the display loop to skip blank entries, or you could actually do a series of moves to overlay the blank entry (there are many efficient ways to do this using strings).
If the user wants to do an add, and the add could go anywhere based on some field value, you will almost certainly have to perform fill array after the add. if array position can be specified by the user (e.g. add a record after this one (cursor)) you may be able to add the record and manipulate the array without accessing the records (as per with the delete).
I could go on, but there are too many variables involved, as noted earlier.