The tedious array of 7 rules The rundown
Create a program that generates an array of random length with random numbers, then apply a series of rules that alter the array. After the rules have been applied, print the sum of the array unless specified otherwise
Array setup
The array must be a random length between 5 and 10 inclusive, with random integers between 1 and 20 inclusive. Each array length should have equal probability of happening and each integer should have an equal probability of being picked per element.
The 7 rules
The rules should act as if they were applied in sequence (eg: rule 1 acts before rule 2) and are only applied once. For proof of rule application, the array must be printed to console after each rule application and once before any rules are applied.

If the array contains a 7, subtract 1 from every element
If rule 1 is applied and the array now contains a 0, add 1 to each element
If the array contains a 13, exclude the 13, and all elements that follow, from the array
If the array contains a 2, exclude all odd numbers
If the array contains a 20, and the third element is even, return 20 as the sum then terminate. If a 20 is present and the third element is odd, return 20 times the length of the array as the sum then terminate.
If the sum is greater than 50, remove the last element repeatedly until it is less than or equal to 50
If the array contains a 16, print the sum in both decimal and hexadecimal.

Example
Here is an initial array,
[20, 2, 5, 7, 14, 8]

Rule 1 can be applied:
[19, 1, 4, 6, 13, 7]

Rule 3 is applied next:
[19, 1, 4, 6]

No other rules are needed, so the program returns 30 as the sum.
Notes

I'm not an experienced code golfer, although I can say my personal record is in Python 3 with 369 bytes.
The rules don't have to actually be applied in order, but have to act as if they did.
Python 3, 294 301 287 356 bytes

import random as r
r=r.randint
k=[r(i)+1for i in[20]*r(5,11)]
p=print
if 7in k:k=[i-1for i in k]
p(k)
if 0in k:k=[i+1for i in k]
p(k)
i=k.find(13)
if not~i:k=k[:i]
p(k)
if 2in k:k=[i for i in k if~i%2]
p(k)
a=0
z=len(k)&gt;2and k[2]%2
if 20in k:a=20*len(k)**z
if~z:p(k)
while sum(k)&gt;50:k=k[:-1]
if~z:p(k)
if a:p(a)
else:a=sum(k);p(a,hex(a)*(16in k))
if~z:p(k)


I don't know how you're going to prevent people circumventing the rules, but this one uses the procedure specified.

+7 bytes; thanks to @YamB for saving a few bytes; added a lot more to fix a previous error.
-14 bytes thanks to @RootTwo and myself and also corrected the error.
+83 bytes; this is getting horribly long because OP keeps changing the  rules.
-some number of bytes thanks to @ZacharyT