How to disable/enable multiple shapekeys visibility?
Iterate through the shape keys and check the current state of the mute attribute. Since it is a simple bool property which only can be True or False, I'd suggest write a toggle in order to enable or disable all shape keys of the selected object per execution:
import bpy

# iterate through the shape keys of the active object
for shape_key in bpy.context.object.data.shape_keys.key_blocks:

    # toggle (if true set it to false and vice versa)
    shape_key.mute = not shape_key.mute
       


Considering your last question and especially for a better workflow, I'd recommend writing a small Add-on instead of running code in the editor for each step:

shape_key_extras.py (updated for 2.8+)
# ##### BEGIN GPL LICENSE BLOCK #####
#
#  This program is free software; you can redistribute it and/or
#  modify it under the terms of the GNU General Public License
#  as published by the Free Software Foundation; either version 2
#  of the License, or (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software Foundation,
#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####

bl_info = {
    &quot;name&quot;: &quot;Shape Key Extras&quot;,
    &quot;description&quot;: &quot;&quot;,
    &quot;author&quot;: &quot;p2or&quot;,
    &quot;version&quot;: (0, 0, 1),
    &quot;blender&quot;: (2, 80, 0),
    &quot;location&quot;: &quot;Properties &gt; Object Data &gt; Shape Keys&quot;,
    &quot;warning&quot;: &quot;&quot;,
    &quot;wiki_url&quot;: &quot;&quot;,
    &quot;tracker_url&quot;: &quot;&quot;,
    &quot;category&quot;: &quot;Mesh&quot;
}

import bpy
import random

from bpy.props import (IntProperty,
                       BoolProperty,
                       FloatProperty,
                       StringProperty,
                       PointerProperty)

from bpy.types import (Operator,
                       PropertyGroup)

# -------------------------------------------------------------------
#   Helper    
# -------------------------------------------------------------------

def exclude_by_name(char_sequence, name):
    if char_sequence:
        char_list = [i.strip() for i in char_sequence.split(&quot;,&quot;)]
        if name.startswith(tuple(char_list)):
            return True
        else: 
            return False
    else: 
        return False

# -------------------------------------------------------------------
#   Properties    
# -------------------------------------------------------------------

class SKE_PG_settings(PropertyGroup):

    value: FloatProperty(
        name = &quot;Value&quot;,
        description = &quot;Set static value&quot;,
        default = 0,
        #min = 0,
        #max =1
        )
    random_min: FloatProperty(
        name = &quot;Min&quot;,
        description = &quot;Set minimum random value&quot;,
        default = 0,
        #min = 0,
        #max =1
        )
    random_max: FloatProperty(
        name = &quot;Max&quot;,
        description = &quot;Set maximum random value&quot;,
        default = 1,
        #min = 0,
        #max =1
        )
    apply_enabled: BoolProperty (
        name = &quot;Apply Values to enabled Keys only&quot;,
        description = &quot;Apply values to enabled Keys only&quot;,
        default = True 
        )
    exclude: StringProperty (
        name = &quot;Exclude&quot;,
        description = &quot;Exclude by first character&quot;,
        default = &quot;#, =, *&quot;
        )

# -------------------------------------------------------------------
#   Operators    
# -------------------------------------------------------------------

class SKE_OT_enableAll(Operator):
    bl_idname = &quot;shapekeyextras.enable_all&quot;
    bl_label = &quot;Enable All&quot;
    bl_description = &quot;Enable all Shape Keys&quot;

    def execute(self, context):       
        for shapekey in context.object.data.shape_keys.key_blocks:
            shapekey.mute = False

        self.report({'INFO'}, &quot;All enabled&quot;)     
        return {'FINISHED'}


class SKE_OT_disableAll(Operator):
    bl_idname = &quot;shapekeyextras.disable_all&quot;
    bl_label = &quot;Disable All&quot;
    bl_description = &quot;Disable all Shape Keys&quot;

    def execute(self, context):       
        for shapekey in context.object.data.shape_keys.key_blocks:
            shapekey.mute = True

        self.report({'INFO'}, &quot;All Shape Keys disabled&quot;)        
        return {'FINISHED'}

class SKE_OT_toggleAll(Operator):
    bl_idname = &quot;shapekeyextras.toggle&quot;
    bl_label = &quot;Toggle Mute&quot;
    bl_description = &quot;Toggle Mute of all Shape Keys&quot;

    def execute(self, context):        
        for shapekey in context.object.data.shape_keys.key_blocks:
            shapekey.mute = not shapekey.mute

        self.report({'INFO'}, &quot;Enabled Shape Keys disabled and Disabled Shape Keys enabled&quot;)          
        return {'FINISHED'}

class SKE_OT_randomizeValues(Operator):
    bl_idname = &quot;shapekeyextras.randomize&quot;
    bl_label = &quot;Randomize Values&quot;
    bl_description = &quot;Randomize all Shape Key Values&quot;

    def execute(self, context):
        scn = context.scene
        ske = scn.shape_key_extras

        if ske.apply_enabled is True:       
            for shapekey in context.object.data.shape_keys.key_blocks:
                exclude_char = exclude_by_name(ske.exclude, shapekey.name)
                if shapekey.name is not 'Basis' and exclude_char is not True:
                    if shapekey.mute is False:
                        shapekey.value = random.uniform(ske.random_min, ske.random_max)
        else:
            for shapekey in context.object.data.shape_keys.key_blocks:
                exclude_char = exclude_by_name(ske.exclude, shapekey.name)
                if shapekey.name is not 'Basis' and exclude_char is not True:
                    shapekey.value = random.uniform(ske.random_min, ske.random_max)

        self.report({'INFO'}, &quot;Values for Shape Keys generated&quot;)
        return {'FINISHED'}

class SKE_OT_applyValues(Operator):
    bl_idname = &quot;shapekeyextras.apply&quot;
    bl_label = &quot;Apply Values&quot;
    bl_description = &quot;Apply a static Value to all Shape Keys&quot;

    def execute(self, context):
        scn = context.scene
        ske = scn.shape_key_extras

        if ske.apply_enabled is True:       
            for shapekey in context.object.data.shape_keys.key_blocks:
                exclude_char = exclude_by_name(ske.exclude, shapekey.name)
                if shapekey.name is not 'Basis' and exclude_char is not True:              
                    if shapekey.mute is False:
                        shapekey.value = ske.value
        else:
            for shapekey in context.object.data.shape_keys.key_blocks:
                exclude_char = exclude_by_name(ske.exclude, shapekey.name)
                if shapekey.name is not 'Basis' and exclude_char is not True:
                    shapekey.value = ske.value

        self.report({'INFO'}, &quot;Value assigned to Shape Keys&quot;)        
        return {'FINISHED'}

# -------------------------------------------------------------------
#   UI    
# -------------------------------------------------------------------

def draw_shapekey_extras(self, context):

    scn = context.scene
    layout = self.layout
    ske = scn.shape_key_extras

    layout.separator()
    layout.use_property_decorate = False  # No animation.
    layout.use_property_split = False
    
    row = layout.row()
    row.label(text=&quot;Mute State&quot;)
    col = layout.column(align=True)
    rowsub = col.row(align=True)
    rowsub.operator(SKE_OT_enableAll.bl_idname, icon=&quot;RESTRICT_VIEW_OFF&quot;)
    rowsub.operator(SKE_OT_disableAll.bl_idname, icon=&quot;RESTRICT_VIEW_ON&quot;)
    col.operator(SKE_OT_toggleAll.bl_idname, icon=&quot;FILE_REFRESH&quot;)
    
    layout.separator()
    row = layout.row()
    row.label(text=&quot;Set Shape Key Values&quot;)
    col = layout.column(align=True)
    rowsub = col.row(align=True)
    rowsub.prop(ske, &quot;random_min&quot;)
    rowsub.prop(ske, &quot;random_max&quot;)
    col.operator(SKE_OT_randomizeValues.bl_idname)
    
    row = layout.row()
    col = layout.column(align=True)
    col.prop(ske, &quot;value&quot;)
    col.operator(SKE_OT_applyValues.bl_idname)
    
    row = layout.row()
    col = layout.column(align=True)
    col.prop(ske, &quot;exclude&quot;)
    col = layout.column(align=True)
    col.prop(ske, &quot;apply_enabled&quot;)
    layout.separator()


# -------------------------------------------------------------------
# register    
# -------------------------------------------------------------------

classes = (
    SKE_PG_settings,
    SKE_OT_enableAll,
    SKE_OT_disableAll,
    SKE_OT_toggleAll,
    SKE_OT_randomizeValues,
    SKE_OT_applyValues,
)


def register():
    from bpy.utils import register_class
    for cls in classes:
        register_class(cls)
        
    bpy.types.DATA_PT_shape_keys.append(draw_shapekey_extras)
    bpy.types.Scene.shape_key_extras = PointerProperty(type=SKE_PG_settings)

def unregister():
    from bpy.utils import unregister_class
    for cls in reversed(classes):
        unregister_class(cls)
        
    bpy.types.DATA_PT_shape_keys.remove(draw_shapekey_extras)
    del bpy.types.Scene.shape_key_extras


if __name__ == &quot;__main__&quot;:
    register()