Issue 1:
This issue can be reproduced with a single line:

julia> (() -> ===(IOBuffer))()
Internal error: encountered unexpected error in runtime:
BoundsError(a=Array{Any, (2,)}[
Main.:(===),
Main.IOBuffer], i=(3,))
jl_bounds_error_ints at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
getindex at ./array.jl:801 [inlined]
getfield_elim_pass! at ./compiler/ssair/passes.jl:576
run_passes at ./compiler/ssair/driver.jl:132
optimize at ./compiler/optimize.jl:277 [inlined]
_typeinf at ./compiler/typeinfer.jl:239
typeinf at ./compiler/typeinfer.jl:211
typeinf_ext at ./compiler/typeinfer.jl:835
typeinf_ext_toplevel at ./compiler/typeinfer.jl:868
typeinf_ext_toplevel at ./compiler/typeinfer.jl:864
jfptr_typeinf_ext_toplevel_10828.clone_1 at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
jl_apply_generic at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
jl_type_infer at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
jl_generate_fptr at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
jl_compile_method_internal at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
jl_apply_generic at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
do_call at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
eval_body at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
jl_interpret_toplevel_thunk at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
top-level scope at REPL[1]:1
jl_toplevel_eval_flex at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
jl_toplevel_eval_flex at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
jl_toplevel_eval_in at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
eval at ./boot.jl:360
jl_apply_generic at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
eval_user_input at /Users/julia/src/julia/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:139
repl_backend_loop at /Users/julia/src/julia/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:200
start_repl_backend at /Users/julia/src/julia/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:185
#run_repl#42 at /Users/julia/src/julia/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:317
run_repl at /Users/julia/src/julia/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:305
jl_apply_generic at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
#875 at ./client.jl:387
jfptr_YY.875_35832.clone_1 at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
jl_apply_generic at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
do_apply at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
jl_f__apply_latest at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
#invokelatest#2 at ./essentials.jl:707 [inlined]
invokelatest at ./essentials.jl:706 [inlined]
run_main_repl at ./client.jl:372
exec_options at ./client.jl:302
_start at ./client.jl:485
jfptr__start_29117.clone_1 at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
jl_apply_generic at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
true_main at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
repl_entrypoint at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
ERROR: ArgumentError: ===: too few arguments (expected 2)
Stacktrace:
[1] (::var"#1#2")()
@ Main ./REPL[1]:1
[2] top-level scope
@ REPL[1]:1

I saw other issues with the same symptom but they seem to have mostly been closed as fixed and it wasn't obvious to me that this issue is the same as any other open issue.

julia> versioninfo()
Julia Version 1.6.0-beta1
Commit b84990e1ac (2021-01-08 12:42 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin19.6.0)
CPU: Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-11.0.0 (ORCJIT, skylake)

Issue 2:
This is a very minor issue since these three forms are supposed to cause an explicit error anyway, but I guess it should not cause an internal one.

julia> ===() # This works normally
ERROR: ArgumentError: ===: too few arguments (expected 2)
Stacktrace:
[1] top-level scope
@ REPL[38]:1

julia> foo() = ===()
foo (generic function with 1 method)

julia> foo()
Internal error: encountered unexpected error in runtime:
BoundsError(a=Array{Any, (1,)}[Main.:(===)], i=(2,))
jl_bounds_error_ints at ~/julia/src/rtutils.c:186
getindex at ./array.jl:833 [inlined]
getfield_elim_pass! at ./compiler/ssair/passes.jl:596
run_passes at ./compiler/ssair/driver.jl:133
optimize at ./compiler/optimize.jl:296 [inlined]
_typeinf at ./compiler/typeinfer.jl:255
typeinf at ./compiler/typeinfer.jl:209
typeinf_ext at ./compiler/typeinfer.jl:911
typeinf_ext_toplevel at ./compiler/typeinfer.jl:944
typeinf_ext_toplevel at ./compiler/typeinfer.jl:940
jfptr_typeinf_ext_toplevel_13423 at ~/julia/usr/lib/julia/sys.so (unknown line)
_jl_invoke at ~/julia/src/gf.c:2243 [inlined]
jl_apply_generic at ~/julia/src/gf.c:2425
jl_apply at ~/julia/src/julia.h:1760 [inlined]
jl_type_infer at ~/julia/src/gf.c:295
jl_generate_fptr at ~/julia/src/jitlayers.cpp:340
jl_compile_method_internal at ~/julia/src/gf.c:1976
jl_compile_method_internal at ~/julia/src/gf.c:1930 [inlined]
_jl_invoke at ~/julia/src/gf.c:2235 [inlined]
jl_apply_generic at ~/julia/src/gf.c:2425
jl_apply at ~/julia/src/julia.h:1760 [inlined]
do_call at ~/julia/src/interpreter.c:117
eval_value at ~/julia/src/interpreter.c:206
eval_stmt_value at ~/julia/src/interpreter.c:157 [inlined]
eval_body at ~/julia/src/interpreter.c:571
jl_interpret_toplevel_thunk at ~/julia/src/interpreter.c:718
top-level scope at REPL[2]:1
jl_toplevel_eval_flex at ~/julia/src/toplevel.c:884
jl_toplevel_eval_flex at ~/julia/src/toplevel.c:829
jl_toplevel_eval_in at ~/julia/src/toplevel.c:936
eval at ./boot.jl:369 [inlined]
eval_user_input at ~/julia/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:148
repl_backend_loop at ~/julia/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:238
start_repl_backend at ~/julia/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:223
#run_repl#45 at ~/julia/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:356
run_repl at ~/julia/usr/share/julia/stdlib/v1.7/REPL/src/REPL.jl:343
_jl_invoke at ~/julia/src/gf.c:2243 [inlined]
jl_apply_generic at ~/julia/src/gf.c:2425
#894 at ./client.jl:394
jfptr_YY.894_25747 at ~/julia/usr/lib/julia/sys.so (unknown line)
_jl_invoke at ~/julia/src/gf.c:2243 [inlined]
jl_apply_generic at ~/julia/src/gf.c:2425
jl_apply at ~/julia/src/julia.h:1760 [inlined]
jl_f__call_latest at ~/julia/src/builtins.c:751
#invokelatest#2 at ./essentials.jl:726 [inlined]
invokelatest at ./essentials.jl:724 [inlined]
run_main_repl at ./client.jl:379
exec_options at ./client.jl:309
_start at ./client.jl:495
jfptr__start_31938 at ~/julia/usr/lib/julia/sys.so (unknown line)
_jl_invoke at ~/julia/src/gf.c:2243 [inlined]
jl_apply_generic at ~/julia/src/gf.c:2425
jl_apply at ~/julia/src/julia.h:1760 [inlined]
true_main at ~/julia/src/jlapi.c:540
jl_repl_entrypoint at ~/julia/src/jlapi.c:682
main at ~/julia/cli/loader_exe.c:51
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
_start at /home/liozou/julia/usr/bin/julia (unknown line)
ERROR: ArgumentError: ===: too few arguments (expected 2)
Stacktrace:
[1] foo()
@ Main ./REPL[1]:1
[2] top-level scope
@ REPL[2]:1

The same happens with foo(x) = ===(x) but there is no issue when === has too many arguments. I initially found this with === but since it looked like a problem specific to builtins, I also checked the other ones (from the list of the docs here) and found that typeassert() has the same issue, while typeassert(x) does not.

I checked for this on master (1.7.0-DEV.1089, commit d6c092d). The issue is old since it is already present in julia 1.0.0. Incidentally, at the time there were similar internal errors for getfield, setfield! and _apply but those seem to have been resolved in between.

It might be good to take it into account when doing a PR for #36163, I have not checked whether #36759 solves it for ===().